/** fine-decision-webui 19-10-02 02:04:30 */
window.Dec || (window.Dec = {}, Dec.injection = {}), window.DecCst || (window.DecCst = {}), Dec.resourceURL = Dec.fineServletURL + "/resources?path=/com/fr/web/resources/dist/", Dec.system = Dec.system || {}, Dec.personal = Dec.personal || {}, Dec.personal.homepage = Dec.personal.homepage || {}, BI.StartOfWeek = Dec.system.weekBegins, BI.specialCharsMap = DecCst.EncodeSpecialChar ? DecCst.EncodeSpecialChar.CHARSET : {}, Dec.Utils = Dec.Utils || {}, BI.extend(Dec.Utils, {
    transformObject2URLParam: function (e, t, i) {
        if (null == e) return "";
        var o = "", n = typeof e;
        if ("string" == n || "number" == n || "boolean" == n) o += "&" + t + "=" + encodeURIComponent(e); else for (var r in e) {
            var s = null == t ? r : t + (e instanceof Array ? "[" + r + "]" : "." + r);
            o += "&" + this.transformObject2URLParam(e[r], s, !0)
        }
        return o.substr(1)
    }, buildTokenStr: function (e) {
        return -1 < BI.indexOf(e, "?") ? e + "&" + DecCst.Cookie.URL_TOKEN + "=" + BI.Cache.getCookie(DecCst.Cookie.TOKEN) : e + "?" + DecCst.Cookie.URL_TOKEN + "=" + BI.Cache.getCookie(DecCst.Cookie.TOKEN)
    }, getEncodeURL: function (e, i) {
        return e.replaceAll("\\{(.*?)\\}", function (e, t) {
            return BI.encodeURIComponent(BI.isObject(i) ? i[t] : i)
        })
    }, getUrlQuery: function (e) {
        var t = new RegExp("(^|&)" + e + "=([^&]*)(&|$)"), i = window.location.search.substr(1).match(t);
        return null !== i ? i[2] : ""
    }, isPhoneNumber: function (e) {
        return /^1\d{10}$/.test(e)
    }, checkMultiPhoneNumber: function (e) {
        return /^(1\d{10},\s*)*1\d{10}$/.test(e)
    }, isMailAddress: function (e) {
        return /^([a-zA-Z0-9._&-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/.test(e)
    }, checkMultiMailAddress: function (e) {
        return /^(([a-zA-Z0-9._&-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+,\s*)*([a-zA-Z0-9._&-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/.test(e)
    }, addAuthParam: function (e) {
        var t = e.split("?");
        return t[0] + "?" + (t[1] || "")
    }, checkHashAuthority: function (e) {
        var i = e.split("/"),
            o = BI.find(BI.Constants.getConstant("dec.constant.management.navigation"), function (e, t) {
                return t.value === i[1]
            });
        return !!o && !!BI.some(Dec.decisionModules, function (e, t) {
            return t.id === o.id
        })
    }, buildResourceURI: function (e) {
        return Dec.fineServletURL + "/resources?path=" + e
    }, appendQuery: function (e, t) {
        var i = e.split("?"), o = i[0], n = i[1] || "";
        return "" !== n && (n.endWith("&") || (n += "&")), "string" == typeof t ? (t.startWith("&") && (n = t.substr(1)), n += t) : (BI.each(t, function (e, t) {
            "string" == typeof e && (n += e + "=" + t + "&")
        }), n = n.substr(0, n.length - 1)), o + "?" + n
    }, getDynamicDateValue: function (e) {
        if (e.type === BI.DynamicDateCombo.Dynamic) return BI.DynamicDateHelper.getCalculation(e.value).print("%Y-%X-%d");
        var t = e.type === BI.DynamicDateCombo.Static ? e.value : e;
        return BI.getDate(t.year, t.month - 1, t.day).print("%Y-%X-%d")
    }, strLength: function (e) {
        return BI.isNull(e) ? 0 : (BI.isString(e) || (e += ""), e.replace(/[^\x00-\xff]/g, "01").length)
    }, parseVals2Array: function (e) {
        var i = this, o = [];
        return BI.each(e, function (e, t) {
            BI.isEmpty(t) ? o.push(e) : o = o.concat(i.parseVals2Array(t))
        }), o
    }, encodeParam: function (e) {
        for (var t in e) _.isObject(e[t]) ? e[t] = window.encodeURIComponent(BI.jsonEncode(e[t])) : e[t] = window.encodeURIComponent(e[t]);
        return e
    }, exportFileByForm: function (e, t, i) {
        i = i || {}, e = Dec.fineServletURL + e;
        var o = {method: i.method || "POST", url: e, data: t, target: i.target},
            n = $('<form method="' + o.method + '" />');
        for (var r in n.attr("action", o.url), n.attr("method", o.method || "post"), n.attr("target", o.target || "_self"), !0 === i.notEncode || (o.data = this.encodeParam(o.data)), o.data) n.append('<input type="hidden" name="' + r + '" value="' + o.data[r] + '" />');
        $(document.body).append(n), n[0].submit(), n.destroy()
    }, randomStr: function (e) {
        for (var t = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"], i = "", o = 0; o < e; o++) i += t[parseInt(t.length * Math.random(), 10)];
        return i
    }, checkValidName: function (e) {
        return /^[A-Za-z0-9_\-\.\u2E80-\u2FDF\u3040-\u318F\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7FF]+$/.test(e)
    }, checkValidURL: function (e) {
        return /^((?!@).)*$/.test(e)
    }, checkValidCharacter: function (e) {
        return /^[A-Za-z0-9_\.\(\)\[\]\{\}\（）\u2E80-\u2FDF\u3040-\u318F\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7FF]+$/.test(e)
    }, checkValidPort: function (e) {
        return /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/.test(e)
    }, checkValidMacAddress: function (e) {
        return /^[A-F0-9]{2}(-[A-F0-9]{2}){5}$|^[A-F0-9]{2}(:[A-F0-9]{2}){5}$/.test(e)
    }, distinguishTemplateType: function (i) {
        var o = "";
        return BI.each(["cpt", "frm"], function (e, t) {
            new RegExp("\\." + t).test(i) && (o = t)
        }), o
    }, isFullScreen: function () {
        return document.fullscreen || document.webkitIsFullScreen || document.mozFullScreen || !1
    }, buildImgUrlByAttachId: function (e) {
        return Dec.fineServletURL + "/v10/attach/image/" + e
    }, checkDirectoryEditAuth: function (e) {
        return !!BI.isNull(e) || BI.some(e, function (e, t) {
            return 3 === t.privilegeType && 2 === t.privilegeValue
        })
    }, initSinglePage: function (e) {
        var t = 0, i = function () {
            0 === t && e()
        };
        BI.isUndefined(Dec.decisionModules) && (t++, Dec.Utils.getDecisionModules(function (e) {
            Dec.decisionModules = e.data, t--, i()
        })), Dec.Utils.initRefreshToken(), i()
    }, recursionHtmlDecode: function (e) {
        !function o(i) {
            BI.each(i, function (e, t) {
                BI.isString(t) ? i[e] = BI.htmlDecode(t) : o(t)
            })
        }(e)
    }, isPositiveNumber: function (e) {
        return BI.isNumeric(e) && 0 < e
    }
}), BI.extend(Dec.Utils, {
    getIconByTableType: function (e) {
        switch (e) {
            case DecCst.Table.ANALYSIS:
                return "analysis-table-font";
            case DecCst.Table.DATABASE:
                return "database-table-font";
            case DecCst.Table.EXCEL:
                return "excel-table-font";
            case DecCst.Table.SQL:
                return "sql-table-font";
            default:
                return "database-table-font"
        }
    }, getTextByFieldType: function (e) {
        switch (e) {
            case BICst.COLUMN.STRING:
                return BI.i18nText("Dec-Basic_Text");
            case BICst.COLUMN.NUMBER:
                return BI.i18nText("Dec-Basic_Number");
            case BICst.COLUMN.DATE:
                return BI.i18nText("Dec-Basic_Date");
            default:
                return ""
        }
    }
}), DecCst = DecCst || {}, DecCst.Login = DecCst.Login || {}, DecCst.Login.Tabs = {}, DecCst.Login.Tabs.LOGIN = "login", DecCst.Login.Tabs.FORGET_PASSWORD = "forget", DecCst.Login.Tabs.AUTHENTICATION = "authentication", DecCst.Login.Tabs.PASSWORD_TOKEN = "password", DecCst.Login.Tabs.PASSWORD_OLD = "single", DecCst.Login.Tabs.SUCCESS_PWD = "password.success", DecCst.Login.Tabs.SUCCESS_TOKEN = "password.token", DecCst.Login.Tabs.VERIFY_BING = "verify", DecCst.Login.Tabs.LOCKED = "locked", DecCst.Login.AuthenticationWay = {}, DecCst.Login.AuthenticationWay.PHOME = "mobile", DecCst.Login.AuthenticationWay.EMAIL = "email", DecCst.Login.AuthenticationModule = {}, DecCst.Login.AuthenticationModule.PWD_UPDATE = "update", DecCst.Login.AuthenticationModule.PWD_STRENGTH = "strength", DecCst.Login.AuthenticationModule.LOGIN = "login", DecCst.Login.AuthenticationModule.SINGLE = "single", function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login"}, _store: function () {
            return BI.Models.getModel("dec.model.login")
        }, watch: {}, render: function () {
            var t = this, e = this.model.loginConfig;
            return BI.Services.getService("dec.service.login").initStyles(), {
                type: "bi.center_adapt",
                cls: "dec-login-background",
                items: [{
                    type: "bi.htape",
                    cls: "login-card",
                    width: 720,
                    height: 380,
                    items: [{
                        type: "bi.absolute",
                        $testId: "dec-login-img-background",
                        cls: "dec-login-img-background",
                        items: [{
                            el: {
                                type: "bi.horizontal_auto",
                                cls: "dec-login-left-color",
                                items: [{
                                    el: {
                                        type: "bi.center_adapt",
                                        items: [{
                                            type: "bi.img",
                                            src: BI.isEmpty(e.loginLogoImgId) ? Dec.resourceURL + "resources/logo.png" : Dec.fineServletURL + "/login/image/" + e.loginLogoImgId,
                                            height: 50,
                                            width: "auto"
                                        }]
                                    }, tgap: 140, bgap: 30
                                }, {type: "bi.label", cls: "dec-font-weight-bold", text: e.loginTitle}]
                            }, top: 0, right: 0, bottom: 0, left: 0
                        }],
                        ref: function (e) {
                            t.loginLeft = e
                        }
                    }, {type: "dec.login.index", cls: "bi-card", width: 270}]
                }]
            }
        }, mounted: function () {
            var e = this.model.loginConfig;
            e.loginImg && this.loginLeft.element.css("backgroundImage", "url(" + Dec.fineServletURL + "/login/image/" + e.loginImgId + ")")
        }
    });
    BI.shortcut("dec.login", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        _init: function () {
            this.loginConfigInfo = Dec.loginConfig || {}
        }, state: function () {
            return {}
        }, computed: {
            loginConfig: function () {
                return this.loginConfigInfo
            }
        }, actions: {}
    });
    BI.model("dec.model.login", e)
}();
var Service = BI.inherit(BI.OB, {
    addLoginInfo: function (e, t) {
        Dec.Utils.addLastLoginInfo({
            time: BI.print(BI.getDate(), "%Y-%X-%d %H:%M:%S"),
            ip: e.ip || "",
            city: e.provincecity || ""
        }, t)
    }, useTokenLoginValue: function (e, t, i) {
        Dec.Utils.loginTokenLogin({token: e, origin: Dec.Utils.getUrlQuery("origin"), validity: t}, i)
    }, initStyles: function () {
        document.title = Dec.loginConfig.loginTitle || BI.i18nText("Dec-Fine_Decision");
        var e = Dec.loginConfig.loginColor;
        if (!BI.isEmpty(e)) {
            var t = {
                "#wrapper .dec-login-left-color": this._toRGBABackground(e, .7),
                "#wrapper .bi-high-light-border": {"border-color": e, "background-color": e},
                ".bi-checkbox.active .checkbox-content, .bi-checkbox:active .checkbox-content": {
                    "border-color": e,
                    "background-color": e
                },
                "#wrapper .login-button": BI.extend({"border-color": e, background: e}, this._btnShadow(e, .2)),
                "#wrapper .password-btn": {color: e},
                "#wrapper .button-common.clear": {color: e},
                "#wrapper .bi-list-item-active.active, .bi-list-item-active:active": {color: e},
                "#wrapper .bi-list-item-active.active .b-font:before, .bi-list-item-active:active .b-font:before": {color: e}
            }, i = {
                "#wrapper .slider-moving .track-moved": BI.extend({"border-color": e}, this._toRGBABackground(e, .2)),
                "#wrapper .slider-moving .slider-trigger": {"border-color": e, background: e}
            }, o = {
                "#wrapper .login-back-font, #wrapper .login-trigger-font": {color: e},
                "#wrapper .icon-combo-trigger-icon .b-font, #wrapper .item-icon": {color: e},
                "#wrapper .password-success-font .b-font:before": {color: e}
            }, n = "", r = BI.extend({}, t, o, i);
            BI.each(r, function (e, t) {
                n += e + "{", BI.each(t, function (e, t) {
                    n += e + ":" + t + ";"
                }), n += "} "
            }), BI.StyleLoaders.removeStyle("login").loadStyle("login", n)
        }
    }, _btnShadow: function (e, t) {
        var i = this._toRGBAColor(e, t);
        return {
            "-webkit-box-shadow": "0 5px 15px 0 " + i + ";",
            "-moz-box-shadow": "0 5px 15px 0 " + i + ";",
            "box-shadow": "0 5px 15px 0 " + i + ";"
        }
    }, _toRGBAColor: function (e, t) {
        BI.DOM.isHexColor(e) && (e = BI.DOM.hex2rgb(e));
        var i = BI.DOM.rgb2json(e);
        return i.a = t, BI.DOM.json2rgba(i)
    }, _toRGBABackground: function (e, t) {
        BI.DOM.isHexColor(e) && (e = BI.DOM.hex2rgb(e));
        var i = BI.DOM.rgb2json(e), o = Dec.Utils.rgb2hsv(i);
        o.s = Math.min(1.5 * o.s, 100), (i = Dec.Utils.hsv2rgb(o)).a = t;
        var n = BI.DOM.json2rgba(i), r = Dec.Utils.rgba2argb(n);
        return {
            "background-color": BI.isIE9Below() ? "transparent" : n,
            filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=" + r + ",endColorstr=" + r + ");"
        }
    }
});
BI.service("dec.service.login", Service), Dec.start = function () {
    BI.createWidget({type: "dec.login", element: "#wrapper"})
}, BI.constant("dec.constant.login.authentication.way", [{
    value: DecCst.Login.AuthenticationWay.PHOME,
    text: BI.i18nText("Dec-User_Mobile"),
    iconCls: "login-mobile-font"
}, {
    value: DecCst.Login.AuthenticationWay.EMAIL,
    text: BI.i18nText("Dec-User_Email"),
    iconCls: "login-email-font"
}]), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-item", iconCls: "", watermark: "", inputType: "text", value: ""},
        render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.vertical",
                items: [{
                    type: "bi.htape",
                    height: 36,
                    items: [{
                        type: "bi.vertical_adapt",
                        cls: "item-icon " + e.iconCls,
                        invisible: "" === e.iconCls,
                        width: "" === e.iconCls ? 0 : 26,
                        items: [{type: "bi.center_adapt", items: [{type: "bi.icon"}]}]
                    }, {
                        type: "bi.absolute",
                        items: [{
                            el: {
                                type: "bi.input",
                                element: "<input type='" + e.inputType + "' placeholder='" + e.watermark + "'/>",
                                allowBlank: !0,
                                value: e.value,
                                ref: function (e) {
                                    t.editor = e
                                },
                                listeners: [{
                                    eventName: BI.Input.EVENT_FOCUS, action: function () {
                                        t.hideError()
                                    }
                                }, {
                                    eventName: BI.Input.EVENT_BLUR, action: function () {
                                        t.fireEvent("EVENT_BLUR")
                                    }
                                }]
                            }, top: 0, right: 0, bottom: 0, left: 0
                        }]
                    }]
                }, {
                    type: "bi.label", cls: "bi-border-top", text: "", height: 24, ref: function (e) {
                        t.lineRow = e
                    }
                }, {
                    type: "bi.label",
                    invisible: !0,
                    height: 24,
                    textAlign: "left",
                    cls: "bi-border-top error",
                    ref: function (e) {
                        t.errorRow = e
                    }
                }]
            }
        },
        showError: function (e) {
            this.errorRow.visible(), this.errorRow.setText(e), this.lineRow.invisible()
        },
        hideError: function () {
            this.errorRow.invisible(), this.errorRow.setText(""), this.lineRow.visible()
        },
        getValue: function () {
            return this.editor.getValue()
        }
    });
    BI.shortcut("dec.login.input.item", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {
            baseCls: "dec-login-item",
            errorText: "",
            iconCls: "",
            watermark: "",
            inputType: "text",
            value: "",
            allowBlank: !0,
            validationChecker: BI.emptyFn
        }, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.vertical",
                items: [{
                    type: "bi.htape",
                    height: 36,
                    items: [{
                        type: "bi.center_adapt",
                        cls: "item-icon " + e.iconCls,
                        invisible: "" === e.iconCls,
                        width: "" === e.iconCls ? 0 : 16,
                        items: [{type: "bi.icon"}]
                    }, {
                        el: {
                            type: "bi.editor",
                            $value: ("" === e.iconCls ? "dec-login-item" : e.iconCls) + "-editor",
                            inputType: e.inputType,
                            watermark: e.watermark,
                            validationChecker: e.validationChecker,
                            allowBlank: e.allowBlank,
                            value: e.value,
                            ref: function (e) {
                                t.editor = e
                            },
                            listeners: [{
                                eventName: BI.Editor.EVENT_FOCUS, action: function () {
                                    t.hideError(), t.fireEvent("EVENT_FOCUS")
                                }
                            }, {
                                eventName: BI.Editor.EVENT_CHANGE, action: function () {
                                    t.hideError(), t.fireEvent("EVENT_CHANGE")
                                }
                            }, {
                                eventName: BI.Editor.EVENT_BLUR, action: function () {
                                    t.fireEvent("EVENT_BLUR")
                                }
                            }]
                        }, lgap: 8
                    }]
                }, {
                    type: "bi.label", cls: "bi-border-top", text: "", height: 24, ref: function (e) {
                        t.lineRow = e
                    }
                }, {
                    type: "bi.label",
                    $testId: ("" === e.iconCls ? "dec-login-item" : e.iconCls) + "-error",
                    invisible: !0,
                    text: e.errorText,
                    height: 24,
                    textAlign: "left",
                    cls: "bi-border-top error",
                    ref: function (e) {
                        t.errorRow = e
                    }
                }]
            }
        }, showError: function (e) {
            this.showErrorText(e)
        }, showErrorText: function (e) {
            this.errorRow.visible(), this.errorRow.setText(e), this.lineRow.invisible()
        }, hideError: function () {
            this.errorRow.invisible(), this.errorRow.setText(""), this.lineRow.visible()
        }, getValue: function () {
            return this.editor.getValue()
        }
    });
    BI.shortcut("dec.login.item", e)
}(), function () {
    var t = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-index"}, _store: function () {
            return BI.Models.getModel("dec.model.login.index")
        }, watch: {
            selectedTab: function (e) {
                this.tab.setSelect(e), this.fireEvent(t.EVENT_CHANGE, e)
            }
        }, render: function () {
            var t = this;
            return {
                type: "bi.tab",
                single: !0,
                cardCreator: BI.bind(this._createCard, this),
                showIndex: this.model.selectedTab,
                ref: function (e) {
                    t.tab = e
                }
            }
        }, mounted: function () {
            this.store.initData()
        }, _createCard: function (e) {
            var t = this;
            switch (e) {
                case DecCst.Login.Tabs.LOGIN:
                    return {
                        type: "dec.login.login", listeners: [{
                            eventName: "EVENT_LOGIN", action: function (e) {
                                t.store.login(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.FORGET_PASSWORD:
                    return {type: "dec.login.forget"};
                case DecCst.Login.Tabs.AUTHENTICATION:
                    return {
                        type: "dec.login.authentication",
                        listeners: [{
                            eventName: "EVENT_LOGIN", action: function (e) {
                                t.store.login(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.PASSWORD_TOKEN:
                    return {
                        type: "dec.login.password", listeners: [{
                            eventName: "EVENT_SAVE", action: function (e) {
                                t.store.toSuccess(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.SUCCESS_PWD:
                    return {
                        type: "dec.login.password.success",
                        username: this.model.loginInfo.username,
                        pwd: this.model.userInfo.pwd,
                        loginValidity: this.model.loginInfo.validity,
                        listeners: [{
                            eventName: "EVENT_LOGIN", action: function (e) {
                                t.store.login(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.SUCCESS_TOKEN:
                    return {
                        type: "dec.login.password.token",
                        listeners: [{
                            eventName: "EVENT_LOGIN", action: function (e) {
                                t.store.login(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.PASSWORD_OLD:
                    return {
                        type: "dec.login.single",
                        username: this.model.loginInfo.username,
                        listeners: [{
                            eventName: "EVENT_BACK", action: function () {
                                t.store.setTab(DecCst.Login.Tabs.LOGIN)
                            }
                        }, {
                            eventName: "EVENT_SURE", action: function (e) {
                                t.store.toSuccess(e)
                            }
                        }]
                    };
                case DecCst.Login.Tabs.VERIFY_BING:
                    return {type: "dec.login.verify"};
                case DecCst.Login.Tabs.LOCKED:
                    return {type: "dec.login.locked"};
                default:
                    return {type: "bi.layout"}
            }
        }
    });
    t.EVENT_CHANGE = "EVENT_CHANGE", BI.shortcut("dec.login.index", t)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        childContext: ["selectedTab", "verifyConfig", "loginInfo", "propsInfo", "sliderToken"], state: function () {
            return {
                token: "",
                selectedTab: DecCst.Login.Tabs.LOGIN,
                loginInfo: {},
                verifyConfig: {},
                propsInfo: {},
                userInfo: {},
                ipInfo: {},
                sliderToken: ""
            }
        }, computed: {}, actions: {
            initData: function () {
                var t = this;
                BI.Cache.deleteCookie(DecCst.Cookie.LAST_LOGIN_INFO, Dec.loginConfig.cookiePath), Dec.Utils.getIPInfo(function (e) {
                    t.model.ipInfo = e
                })
            }, setTab: function (e) {
                this.model.selectedTab = e
            }, setUserInfo: function (e) {
                this.model.userInfo = e
            }, toSuccess: function (e) {
                this.setUserInfo({pwd: e}), this.setTab(DecCst.Login.Tabs.SUCCESS_PWD)
            }, login: function (e) {
                this.setUserInfo({});
                var t = e.validity === DecCst.Cookie.REMEMBER_PASSWORD ? 24 * DecCst.Cookie.REMEMBER_DAY : DecCst.Cookie.VALIDITY_NOW;
                BI.Cache.addCookie(DecCst.Cookie.REMEMBER_LOGIN, e.validity, Dec.loginConfig.cookiePath, t), BI.Cache.addCookie(DecCst.Cookie.TOKEN, e.accessToken, Dec.loginConfig.cookiePath, t), BI.Services.getService("dec.service.login").addLoginInfo(this.model.ipInfo, function () {
                    window.location.href = e.url
                })
            }
        }
    });
    BI.model("dec.model.login.index", e)
}(), function () {
    var i = 0, o = 1, n = 2, e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-slider", $testId: "dec-login-slider"}, _store: function () {
            return BI.Models.getModel("dec.model.login.slider")
        }, watch: {
            checkResult: function (e) {
                var t = this;
                this.model.ableSlider || e === i || (this.element.removeClass("slider-moving"), this.element.toggleClass("slider-fail", e === n), this.element.toggleClass("slider-success", e === o), this.sliderTrigger.setIcon(e === o ? "login-slider-success-font" : "login-slider-fail-font"), e === n ? (t.fireEvent("EVENT_FAIL"), this.failTimeout = window.setTimeout(function () {
                    t.resetAll()
                }, 500)) : (t.sliderImg.changeState(!1), t.fireEvent("EVENT_SUCCESS")))
            }
        }, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute",
                width: 190,
                height: 26,
                items: [{
                    el: {
                        type: "bi.vertical",
                        cls: "bi-card",
                        width: 190,
                        items: [{
                            type: "dec.login.slider.image",
                            cls: "slider-img",
                            invisible: !(this.moving = !1),
                            ref: function (e) {
                                t.sliderImg = e
                            },
                            listeners: [{
                                eventName: "EVENT_REFRESH", action: function () {
                                    t.resetAll()
                                }
                            }]
                        }, {
                            type: "bi.absolute",
                            width: 190,
                            height: 26,
                            items: [{
                                el: {
                                    type: "bi.label",
                                    cls: "bi-border slider-track",
                                    textHeight: 24,
                                    text: BI.i18nText("Dec-Login_To_Slider"),
                                    ref: function (e) {
                                        t.track = e
                                    }
                                }, top: 0, bottom: 0, left: 0, right: 0
                            }, {
                                el: {
                                    type: "bi.default", cls: "track-moved", width: 0, ref: function (e) {
                                        t.movedTrack = e
                                    }
                                }, top: 0, bottom: 0, left: 0
                            }, {
                                el: {
                                    type: "bi.icon_change_button",
                                    cls: "bi-border slider-trigger",
                                    iconCls: "login-slider-trigger-font",
                                    width: 30,
                                    height: 24,
                                    ref: function (e) {
                                        t.sliderTrigger = e
                                    }
                                }, left: 0, top: 0
                            }]
                        }]
                    }, bottom: 0, left: 0, right: 0
                }]
            }
        }, mounted: function () {
            var e, t, i = this;
            this._slider(), this.element.hover(function () {
                window.clearTimeout(t), e = window.setTimeout(function () {
                    i.element.focus(), i.model.ableSlider && i.sliderImg.changeState(!0)
                }, 300)
            }, function () {
                window.clearTimeout(e), t = window.setTimeout(function () {
                    i.model.ableSlider && !i.moving && i.sliderImg.changeState(!1)
                }, 300)
            })
        }, resetAll: function () {
            this.sliderImg.refresh(), this.sliderTrigger.element.css({left: 0}), this.element.removeClass("slider-fail"), this.element.removeClass("slider-success"), this.sliderTrigger.setIcon("login-slider-trigger-font"), this.movedTrack.element.css({width: 0}), window.clearTimeout(this.failTimeout), this.store.reset(), this.track.setText(BI.i18nText("Dec-Login_To_Slider"))
        }, getStatus: function () {
            return {show: this.isVisible(), status: this.model.checkResult === o}
        }, _slider: function () {
            var i = this, o = {x: 0, y: 0}, n = !1, r = this.sliderTrigger.element, s = this.movedTrack.element;
            r.mousedown(function (e) {
                i.model.startSlider && (n = !0, o = {x: e.pageX, y: e.pageY})
            }), $(document).mousemove(function (e) {
                var t = e.pageX - o.x;
                n && 0 < t && t <= 160 && (i.moving = !0, i.element.addClass("slider-moving"), r.css({left: t}), s.css({width: t}), i.track.setText(""), i.sliderImg.move(t))
            }).mouseup(function (e) {
                if (n) {
                    n = !1;
                    var t = e.pageX - o.x;
                    i.store.checkPosition(t)
                }
                i.moving = !1
            })
        }
    });
    BI.shortcut("dec.login.slider", e)
}(), function () {
    var e = 0, i = 1, o = 2, t = BI.inherit(Fix.Model, {
        context: ["sliderToken"], childContext: ["loading"], state: function () {
            return {checkResult: e, ableSlider: !0, loading: !1}
        }, computed: {
            startSlider: function () {
                return !this.model.loading && this.model.ableSlider
            }
        }, actions: {
            checkPosition: function (e) {
                var t = this;
                t.model.ableSlider = !1, e <= 0 ? t.model.checkResult = o : Dec.Utils.checkSliderPosition({
                    sliderToken: this.model.sliderToken,
                    sliderLength: BI.parseInt(e)
                }, function (e) {
                    t.model.checkResult = e.data ? i : o
                })
            }, setAbleSlider: function (e) {
                this.model.ableSlider = e
            }, setStatus: function (e) {
                this.model.checkResult = e
            }, reset: function () {
                this.setAbleSlider(!0), this.setStatus(e)
            }
        }
    });
    BI.model("dec.model.login.slider", t)
}(), BI.extend(Dec, {
    asyncAjax: function (o) {
        o = o || {};
        var e = Dec.fineServletURL + o.url;
        $.support.cors = !0, $.ajax({
            url: e,
            type: o.type,
            headers: o.headers,
            contentType: "application/json",
            data: "GET" === o.type ? null : JSON.stringify(o.data),
            dataType: "json",
            cache: !1,
            async: !0,
            error: function () {
                BI.Msg.toast("ajax error !", {level: "warning"})
            },
            complete: function (e, t) {
                var i = BI.jsonDecode(e.responseText);
                "success" === t && BI.isFunction(o.success) && o.success(i), BI.isFunction(o.complete) && o.complete(i, t)
            }
        })
    }, jsonpAjax: function (e, t) {
        $.ajax({url: e, async: !0, dataType: "JSONP"}).done(function (e) {
            BI.isFunction(t) && t(e)
        })
    }, reqGet: function (e, t, i, o) {
        Dec.asyncAjax({url: e, type: "GET", data: t, success: i, complete: o})
    }, reqPost: function (e, t, i, o) {
        Dec.asyncAjax({url: e, type: "POST", data: t, success: i, complete: o})
    }, reqPut: function (e, t, i, o) {
        Dec.asyncAjax({url: e, type: "PUT", data: t, success: i, complete: o})
    }, reqGetHandle: function (e, t, i, o) {
        Dec.asyncAjax({
            url: e, type: "GET", data: t, success: function (e) {
                e.data !== undefined && BI.isFunction(i) ? i(e.data) : BI.Msg.toast("请求服务器数据失败", {level: "error"})
            }, complete: o
        })
    }
}), Dec.Utils = Dec.Utils || {}, BI.extend(Dec.Utils, {
    rgba2argb: function (e) {
        var t = BI.DOM.rgba2json(e), i = BI.DOM.int2hex;
        return "#" + i(Math.round(255 * t.a)) + i(t.r) + i(t.g) + i(t.b)
    }, rgb2hsv: function (e) {
        var t, i, o = e.r / 255, n = e.g / 255, r = e.b / 255, s = Math.max(o, n, r), a = Math.min(o, n, r), c = s,
            l = s - a;
        if (i = 0 === s ? 0 : l / s, s === a) t = 0; else {
            switch (s) {
                case o:
                    t = (n - r) / l + (n < r ? 6 : 0);
                    break;
                case n:
                    t = (r - o) / l + 2;
                    break;
                case r:
                    t = (o - n) / l + 4
            }
            t /= 6
        }
        return {h: (360 * t).toFixed(2), s: (100 * i).toFixed(2), v: (100 * c).toFixed(2)}
    }, hsv2rgb: function (e) {
        var t, i, o = e.h % 360 / 360 * 360, n = e.s / 100, r = e.v / 100,
            s = [r, r * (1 - n), r * (1 - (i = o / 60 - (t = Math.floor(o / 60 % 6))) * n), r * (1 - (1 - i) * n)],
            a = [[0, 3, 1], [2, 0, 1], [1, 0, 3], [1, 2, 0], [3, 1, 0], [0, 1, 2]];
        return {r: Math.round(255 * s[a[t][0]]), g: Math.round(255 * s[a[t][1]]), b: Math.round(255 * s[a[t][2]])}
    }
}), BI.extend(Dec.Utils, {
    loginConfig: function (e) {
        Dec.reqGetHandle("/login/config", {}, e)
    }, getSystemInfo: function (e) {
        Dec.reqGetHandle("/system/info", {}, e)
    }, login: function (e, t) {
        Dec.reqPost("/login", e, t)
    }, loginTokenLogin: function (e, t) {
        Dec.reqPost("/login/captcha", e, t)
    }, loginChangePwd: function (e, t) {
        Dec.reqPost("/login/pwd/change", e, t)
    }, updateLoginPassword: function (e, t) {
        Dec.reqPut("/login/pwd/resetting", e, t)
    }, getUserNamesByPhone: function (e, t) {
        Dec.reqGet("/login/usernames?" + Dec.Utils.transformObject2URLParam(e, null, !1), "", t)
    }, loginCaptcha: function (e, t) {
        Dec.reqGet("/login/captcha?" + Dec.Utils.transformObject2URLParam(e, null, !0), "", t)
    }, loginGetValidationTool: function (e, t) {
        Dec.reqGetHandle("/login/validation/tool?fine_auth_token=" + window.encodeURIComponent(e), "", t)
    }, loginAuthentication: function (e, t) {
        Dec.reqPut("/login/captcha", e, t)
    }, getIPInfo: function (e) {
        Dec.jsonpAjax("https://cloud.fanruan.com/api/query/ip?timeout=10000", e)
    }, addLastLoginInfo: function (e, t) {
        Dec.reqPost("/login/info?fine_auth_token=" + window.encodeURIComponent(BI.Cache.getCookie(DecCst.Cookie.TOKEN)), e, "", t)
    }, getUsernameErrorTimes: function (e, t) {
        Dec.reqGetHandle("/login/slider?username=" + window.encodeURIComponent(e), {}, t)
    }, getLoginSliderInfo: function (e) {
        Dec.reqGetHandle("/login/slider/info", {}, e)
    }, checkSliderPosition: function (e, t) {
        Dec.reqPost("/login/slider/verification", e, t)
    }, getLoginPasswordStrategy: function (e) {
        Dec.reqGetHandle("/login/password/strategy", {}, e)
    }
}), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-authentication", $testId: "dec-login-authentication"}, _store: function () {
            return BI.Models.getModel("dec.model.login.authentication")
        }, watch: {
            showReceiver: function () {
                this.captchaRow.clearTime()
            }
        }, render: function () {
            var i = this;
            this.options;
            return {
                type: "bi.absolute", items: [{
                    el: {
                        type: "bi.vertical",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Authentication")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            i.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "bi.label",
                            textAlign: "left",
                            invisible: !this.model.showDesc,
                            text: this.model.showDesc,
                            whiteSpace: "normal",
                            bgap: 15
                        }, {
                            el: {
                                type: "bi.absolute",
                                cls: "bi-border-bottom dec-login-item",
                                height: 36,
                                items: [{
                                    el: {
                                        type: "dec.login.icon.text.combo",
                                        invisible: !this.model.isMultiWay,
                                        $value: "authentication",
                                        value: this.model.selectedType,
                                        text: this.model.showReceiver,
                                        items: this.model.supportType,
                                        listeners: [{
                                            eventName: "EVENT_CHANGE", action: function () {
                                                i.store.setReceiverType(this.getValue())
                                            }
                                        }]
                                    }, top: 0, left: 0, bottom: 0, right: 0
                                }, {
                                    el: {
                                        type: "bi.vertical_adapt",
                                        invisible: this.model.isMultiWay,
                                        height: 36,
                                        items: [{
                                            type: "bi.center_adapt",
                                            cls: "item-icon " + this.model.receiverIcon,
                                            width: 16,
                                            items: [{type: "bi.icon"}]
                                        }, {
                                            el: {
                                                type: "bi.label",
                                                $testId: "dec-login-authentication-change-receiver",
                                                $value: this.model.selectedType,
                                                textAlign: "left",
                                                disabled: !0,
                                                text: this.model.showReceiver
                                            }, lgap: 10
                                        }]
                                    }, top: 0, left: 0, bottom: 0, right: 0
                                }]
                            }, bgap: 35
                        }, {
                            type: "dec.login.captcha.item", bgap: 10, btnDisabled: !1, ref: function (e) {
                                i.captchaRow = e
                            }, getCaptcha: function (t) {
                                i.store.captcha({
                                    type: i.model.selectedType,
                                    receiver: i.model.receiver,
                                    username: i.model.loginInfo.username,
                                    token: i.model.propsInfo.token
                                }, function (e) {
                                    e.data ? i.store.setCaptchaSendToken(e.data) : e.errorCode === DecCst.ErrorCode.CAPTCHA_SEND_LIMITED ? i.captchaRow.showError(BI.i18nText("Dec-Error_Get_Captcha_Limited")) : BI.Msg.toast(BI.i18nText("Dec-Error_Get_Captcha"), {level: "error"}), t()
                                })
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-authentication-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Sure"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    i._start()
                                }
                            }]
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }, _start: function () {
            var t = this, e = this.captchaRow.getValue();
            "" !== e ? this.store.startAuthentication({token: this.model.captchaSendToken, captcha: e}, function (e) {
                e.data ? t.model.propsInfo.isChangePwd ? (t.store.setPropsInfo({token: t.model.captchaSendToken}), t.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_TOKEN)) : t.store.tokenLogin(t.model.captchaSendToken, function (e) {
                    t.fireEvent("EVENT_LOGIN", e.data)
                }) : e.errorCode === DecCst.ErrorCode.CAPTCHA_ERROR ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Error")) : e.errorCode === DecCst.ErrorCode.CAPTCHA_TIMEOUT ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Timeout")) : e.errorCode === DecCst.ErrorCode.CAPTCHA_CHECK_LIMITED ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Limited")) : BI.Msg.toast(BI.i18nText("Dec-Error_Check_Captcha_Error"), {level: "error"})
            }) : this.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Null"))
        }
    });
    e.EVENT_INPUT_TYPE = "EVENT_INPUT_TYPE", BI.shortcut("dec.login.authentication", e)
}(), function () {
    var i = "login_authentication", e = BI.inherit(Fix.Model, {
        _init: function () {
            this.loginConfigInfo = Dec.loginConfig || {}
        }, context: ["selectedTab", "loginInfo", "propsInfo", "verifyConfig"], state: function () {
            return {receiverType: "", userNames: [], captchaSendToken: ""}
        }, computed: {
            platformTitle: function () {
                return this.loginConfigInfo.loginTitle || BI.i18nText("Dec-Decision")
            }, showPhone: function () {
                return this.model.propsInfo.phone.replace(/^(\d{3})\d{4}(\d{4})$/, "$1****$2")
            }, showEmail: function () {
                var e = this.model.propsInfo.email.split("@")[0],
                    t = 1 < (e && e.length) ? /^([a-zA-Z0-9._-]{2})[a-zA-Z0-9._-]*(@.+)/ : /^([a-zA-Z0-9._-])[a-zA-Z0-9._-]*(@.+)/;
                return this.model.propsInfo.email.replace(t, "$1****$2")
            }, isSystemSMS: function () {
                var e = this.model.verifyConfig;
                return this.model.propsInfo.isChangePwd ? e.smsVerificationAfterChangePassword : e.smsRemind
            }, isSystemEmail: function () {
                var e = this.model.verifyConfig;
                return this.model.propsInfo.isChangePwd ? e.emailVerificationAfterChangePassword : e.emailRemind
            }, supportType: function () {
                var e = [];
                return this.model.isSystemSMS && this.model.propsInfo.phone && e.push({
                    text: this.model.showPhone,
                    value: DecCst.Login.AuthenticationWay.PHOME,
                    iconCls: "login-mobile-font"
                }), this.model.isSystemEmail && this.model.propsInfo.email && e.push({
                    text: this.model.showEmail,
                    value: DecCst.Login.AuthenticationWay.EMAIL,
                    iconCls: "login-email-font"
                }), e
            }, selectedType: function () {
                var e = BI.Cache.getItem(i) || DecCst.Login.AuthenticationWay.PHOME,
                    t = this.model.isMultiWay ? e : this.model.supportType[0].value;
                return this.model.receiverType || t
            }, receiver: function () {
                return this.model.selectedType === DecCst.Login.AuthenticationWay.PHOME ? this.model.propsInfo.phone : this.model.propsInfo.email
            }, showReceiver: function () {
                return this.model.selectedType === DecCst.Login.AuthenticationWay.PHOME ? this.model.showPhone : this.model.showEmail
            }, receiverIcon: function () {
                return this.model.selectedType === DecCst.Login.AuthenticationWay.PHOME ? "login-mobile-font" : "login-email-font"
            }, singleDesc: function () {
                switch (this.model.propsInfo.from) {
                    case DecCst.Login.AuthenticationModule.LOGIN:
                        return BI.i18nText("Dec-Login_Authentication_Tip", BI.i18nText("Dec-Login_Authentication_Open"));
                    case DecCst.Login.AuthenticationModule.PWD_STRENGTH:
                        return BI.i18nText("Dec-Login_Authentication_Password_Strength_Tip");
                    case DecCst.Login.AuthenticationModule.PWD_UPDATE:
                        return BI.i18nText("Dec-Login_Authentication_Password_Update_Tip");
                    case DecCst.Login.AuthenticationModule.SINGLE:
                        return BI.i18nText("Dec-Login_Authentication_Single_Tip");
                    default:
                        return ""
                }
            }, multiDesc: function () {
                switch (this.model.propsInfo.from) {
                    case DecCst.Login.AuthenticationModule.LOGIN:
                        return BI.i18nText("Dec-Login_Authentication_Multi_Tip", BI.i18nText("Dec-Login_Authentication_Open"));
                    case DecCst.Login.AuthenticationModule.PWD_STRENGTH:
                        return BI.i18nText("Dec-Login_Authentication_Password_Strength_Multi_Tip");
                    case DecCst.Login.AuthenticationModule.PWD_UPDATE:
                        return BI.i18nText("Dec-Login_Authentication_Password_Update_Multi_Tip");
                    case DecCst.Login.AuthenticationModule.SINGLE:
                        return BI.i18nText("Dec-Login_Authentication_Single_Multi_Tip");
                    default:
                        return ""
                }
            }, isMultiWay: function () {
                return 1 < BI.size(this.model.supportType)
            }, showDesc: function () {
                return this.model.isMultiWay ? this.model.multiDesc : this.model.singleDesc
            }
        }, actions: {
            setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, captcha: function (e, t) {
                Dec.Utils.loginCaptcha(e, t)
            }, setCaptchaSendToken: function (e) {
                this.model.captchaSendToken = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }, startAuthentication: function (e, t) {
                Dec.Utils.loginAuthentication(e, function (e) {
                    t(e)
                })
            }, tokenLogin: function (e, t) {
                BI.Services.getService("dec.service.login").useTokenLoginValue(e, this.model.loginInfo.validity, t)
            }, setReceiverType: function (e) {
                this.model.receiverType = e, BI.Cache.setItem(i, e)
            }
        }
    });
    BI.model("dec.model.login.authentication", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {
            baseCls: "dec-login-item dec-login-captcha-item",
            errorText: "",
            btnDisabled: !0,
            getCaptcha: BI.emptyFn
        }, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.vertical",
                items: [{
                    type: "bi.htape",
                    height: 36,
                    items: [{
                        type: "bi.center_adapt",
                        cls: "item-icon login-password-font",
                        width: 16,
                        items: [{type: "bi.icon"}]
                    }, {
                        el: {
                            type: "bi.editor",
                            $value: "dec-login-captcha-item-editor",
                            watermark: BI.i18nText("Dec-Login_Input_Captcha"),
                            allowBlank: !0,
                            ref: function (e) {
                                t.editor = e
                            },
                            listeners: [{
                                eventName: BI.Editor.EVENT_FOCUS, action: function () {
                                    t.hideError()
                                }
                            }]
                        }, lgap: 8
                    }, {
                        type: "bi.right",
                        width: 80,
                        items: [{
                            type: "bi.button",
                            $testId: "dec-login-get-captcha-btn",
                            clear: !0,
                            height: 36,
                            block: !0,
                            disabled: e.btnDisabled,
                            text: BI.i18nText("Dec-Login_Get_Captcha"),
                            ref: function (e) {
                                t.getButton = e
                            },
                            handler: function () {
                                t.setButtonEnable(!1), e.getCaptcha(function (e) {
                                    e || t.regainCaptcha()
                                })
                            }
                        }]
                    }]
                }, {
                    type: "bi.label", cls: "bi-border-top", text: "", height: 24, ref: function (e) {
                        t.lineRow = e
                    }
                }, {
                    type: "bi.label",
                    invisible: !0,
                    text: e.errorText,
                    height: 24,
                    textAlign: "left",
                    cls: "bi-border-top error",
                    ref: function (e) {
                        t.errorRow = e
                    }
                }]
            }
        }, setButtonEnable: function (e) {
            this.captchaTime && (e = !1), this.getButton.setEnable(e)
        }, regainCaptcha: function () {
            var e = this, t = 0;
            window.clearInterval(e.captchaTime), this.captchaTime = window.setInterval(function () {
                if (60 === t) return window.clearInterval(e.captchaTime), e.captchaTime = null, e.getButton.setText(BI.i18nText("Dec-Login_Get_Captcha")), void e.setButtonEnable(!0);
                e.getButton.setText(BI.i18nText("Dec-Login_Regain_Captcha") + "(" + (60 - t) + ")"), t++
            }, 1e3), this.setButtonEnable(!1)
        }, clearTime: function () {
            window.clearInterval(this.captchaTime), this.captchaTime = null, this.getButton.setText(BI.i18nText("Dec-Login_Get_Captcha")), this.setButtonEnable(!0)
        }, showError: function (e) {
            this.errorRow.visible(), this.errorRow.setText(e), this.lineRow.invisible()
        }, hideError: function () {
            this.errorRow.invisible(), this.errorRow.setText(""), this.lineRow.visible()
        }, getValue: function () {
            return this.editor.getValue()
        }
    });
    BI.shortcut("dec.login.captcha.item", e)
}(), function () {
    var t = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-item", errorText: "", watermark: "", value: "", validationChecker: BI.emptyFn},
        render: function () {
            var t = this, e = this.options;
            return this.captchaType = DecCst.Login.AuthenticationWay.PHOME, {
                type: "bi.vertical", items: [{
                    type: "bi.htape",
                    height: 36,
                    items: [{
                        type: "bi.center_adapt",
                        width: 24,
                        items: [{
                            type: "dec.icon_combo",
                            $value: "login-item",
                            value: DecCst.Login.AuthenticationWay.PHOME,
                            height: 24,
                            width: 24,
                            items: BI.Constants.getConstant("dec.constant.login.authentication.way"),
                            listeners: [{
                                eventName: BI.IconCombo.EVENT_CHANGE, action: function () {
                                    t._changeInput(this.getValue()[0])
                                }
                            }]
                        }]
                    }, {
                        el: {
                            type: "bi.vertical",
                            items: [{
                                type: "bi.editor",
                                $value: "dec-login-password-authentication-phone-editor",
                                height: 36,
                                watermark: BI.i18nText("Dec-Login_Phone_Watermark"),
                                validationChecker: e.validationChecker,
                                value: e.value,
                                allowBlank: !0,
                                ref: function (e) {
                                    t.editor = e
                                },
                                listeners: [{
                                    eventName: BI.Editor.EVENT_FOCUS, action: function () {
                                        t.hideError()
                                    }
                                }, {
                                    eventName: BI.Editor.EVENT_BLUR, action: function () {
                                        t.fireEvent(BI.Editor.EVENT_BLUR, arguments)
                                    }
                                }, {
                                    eventName: BI.Editor.EVENT_CHANGE, action: function () {
                                        t.fireEvent(BI.Editor.EVENT_CHANGE, arguments), t.hideError()
                                    }
                                }]
                            }, {
                                type: "bi.editor",
                                $value: "dec-login-password-authentication-email-editor",
                                height: 36,
                                watermark: BI.i18nText("Dec-Login_Email_Watermark"),
                                value: e.value,
                                invisible: !0,
                                ref: function (e) {
                                    t.emailRow = e
                                },
                                listeners: [{
                                    eventName: BI.Editor.EVENT_FOCUS, action: function () {
                                        t.hideError()
                                    }
                                }, {
                                    eventName: BI.Editor.EVENT_BLUR, action: function () {
                                        t.fireEvent(BI.Editor.EVENT_BLUR, arguments)
                                    }
                                }, {
                                    eventName: BI.Editor.EVENT_CHANGE, action: function () {
                                        t.fireEvent(BI.Editor.EVENT_CHANGE, arguments), t.hideError()
                                    }
                                }]
                            }]
                        }
                    }]
                }, {
                    type: "bi.label", cls: "bi-border-top", text: "", height: 24, ref: function (e) {
                        t.lineRow = e
                    }
                }, {
                    type: "bi.label",
                    invisible: !0,
                    text: e.errorText,
                    height: 24,
                    textAlign: "left",
                    cls: "bi-border-top error",
                    ref: function (e) {
                        t.errorRow = e
                    }
                }]
            }
        },
        showError: function (e) {
            this.captchaType === DecCst.Login.AuthenticationWay.PHOME ? this.editor.focus() : this.emailRow.focus(), this.showErrorText(e)
        },
        showErrorText: function (e) {
            this.errorRow.visible(), this.errorRow.setText(e), this.lineRow.invisible()
        },
        hideError: function () {
            this.errorRow.invisible(), this.errorRow.setText(""), this.lineRow.visible()
        },
        getValue: function () {
            return {
                receiver: this.captchaType === DecCst.Login.AuthenticationWay.PHOME ? this.editor.getValue() : this.emailRow.getValue(),
                type: this.captchaType
            }
        },
        _changeInput: function (e) {
            this.captchaType = e, this.editor.setVisible(e === DecCst.Login.AuthenticationWay.PHOME), this.emailRow.setVisible(e === DecCst.Login.AuthenticationWay.EMAIL), this.fireEvent(t.EVENT_INPUT_TYPE, e === DecCst.Login.AuthenticationWay.PHOME)
        }
    });
    t.EVENT_INPUT_TYPE = "EVENT_INPUT_TYPE", BI.shortcut("dec.login.icon.item", t)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-authentication"}, _store: function () {
            return BI.Models.getModel("dec.model.login.forget")
        }, watch: {
            userNames: function (e) {
                this.usernameRow.populate(e), this.usernameRow.setValue(), this.usernameRow.setVisible(1 < BI.size(e)), this.captchaRow.setButtonEnable(1 === BI.size(e))
            }, errorMsg: function (e) {
                this.mailRow.showError(e)
            }, isPhone: function () {
                this.mobile = ""
            }
        }, render: function () {
            var i = this;
            this.options;
            return this.mobile = "", {
                type: "bi.absolute", items: [{
                    el: {
                        type: "bi.vertical",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Authentication")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            i.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "dec.login.icon.item", bgap: 10, ref: function (e) {
                                i.mailRow = e
                            }, listeners: [{
                                eventName: BI.Editor.EVENT_BLUR, action: function () {
                                    i._validationChecker(this.getValue().receiver, !0)
                                }
                            }, {
                                eventName: e.EVENT_INPUT_TYPE, action: function (e) {
                                    i._hideAllError(), i.store.setIsPhone(e)
                                }
                            }]
                        }, {
                            type: "dec.login.text_value_combo",
                            bgap: 30,
                            height: 24,
                            invisible: !0,
                            watermark: BI.i18nText("Dec-Login_Authentication_Choose_Username"),
                            items: [],
                            ref: function (e) {
                                i.usernameRow = e
                            },
                            listeners: [{
                                eventName: BI.TextValueCombo.EVENT_CHANGE, action: function () {
                                    i.captchaRow.clearTime()
                                }
                            }]
                        }, {
                            type: "dec.login.captcha.item", bgap: 10, ref: function (e) {
                                i.captchaRow = e
                            }, getCaptcha: function (t) {
                                i.store.captcha(BI.extend(i.mailRow.getValue(), {username: i._getUsername()}), function (e) {
                                    e.data ? (i.store.setCaptchaSendToken(e.data), t()) : e.errorCode === DecCst.ErrorCode.SMS_UNUSABLE ? (i.warningText.setText(BI.i18nText("Dec-Error_Login_SMS_Unable")), t(!0)) : e.errorCode === DecCst.ErrorCode.MAIL_UNUSABLE ? (i.warningText.setText(BI.i18nText("Dec-Error_Login_Email_Unable")), t(!0)) : e.errorCode === DecCst.ErrorCode.CAPTCHA_SEND_LIMITED ? (i.captchaRow.showError(BI.i18nText("Dec-Error_Get_Captcha_Limited")), t(!0)) : (BI.Msg.toast(BI.i18nText("Dec-Error_Get_Captcha"), {level: "error"}), t())
                                })
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-forget-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Sure"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    i._start()
                                }
                            }]
                        }, {
                            type: "bi.label",
                            textAlign: "left",
                            whiteSpace: "normal",
                            text: "",
                            cls: "warning-text",
                            tgap: 5,
                            ref: function (e) {
                                i.warningText = e
                            }
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }, _start: function () {
            var t = this, e = this.mailRow.getValue().receiver, i = this.captchaRow.getValue();
            t._validationChecker(e) && (BI.isEmpty(this._getUsername()) ? BI.Msg.toast(BI.i18nText("Dec-Error_Login_Choose_Username"), {level: "error"}) : "" !== i ? this.store.startAuthentication({
                token: this.model.captchaSendToken,
                captcha: i
            }, function (e) {
                e.data ? (t.store.setPropsInfo({token: t.model.captchaSendToken}), t.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_TOKEN)) : e.errorCode === DecCst.ErrorCode.CAPTCHA_ERROR ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Error")) : e.errorCode === DecCst.ErrorCode.CAPTCHA_TIMEOUT ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Timeout")) : e.errorCode === DecCst.ErrorCode.CAPTCHA_CHECK_LIMITED ? t.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Limited")) : BI.Msg.toast(BI.i18nText("Dec-Error_Check_Captcha_Error"), {level: "error"})
            }) : this.captchaRow.showError(BI.i18nText("Dec-Error_Captcha_Null")))
        }, _validationChecker: function (e, t) {
            var i = this,
                o = this.model.isPhone ? this._validationCheckerPhone(e, t) : this._validationCheckerMail(e, t);
            return o && this.mobile !== e && (this.mobile = e, this.store.getUserNames({
                type: this.model.isPhone ? DecCst.Login.AuthenticationWay.PHOME : DecCst.Login.AuthenticationWay.EMAIL,
                receiver: e
            }, function (e) {
                e.data ? i.captchaRow.clearTime() : e.errorCode === DecCst.ErrorCode.PHONE_EMAIL_NOT_EXIST ? (i.mailRow.showErrorText(BI.i18nText("Dec-Error_Login_Unbind_" + (i.model.isPhone ? "Phone" : "Mail"))), i.captchaRow.setButtonEnable(!1)) : e.errorCode && BI.Msg.toast(BI.i18nText("Dec-Error_Get_Users"), {level: "error"})
            })), o
        }, _validationCheckerPhone: function (e, t) {
            if ("" === e) return this.mailRow.showErrorText(BI.i18nText("Dec-Error_Phone_Not_Null")), !1;
            if (/^1[0-9]{10}$/.test(e)) return this.mailRow.hideError(), BI.isEmpty(this._getUsername()) || this.captchaRow.setButtonEnable(!0), !0;
            var i = BI.i18nText("Dec-Error_Phone_Format");
            return t ? this.mailRow.showErrorText(i) : this.mailRow.showError(i), !1
        }, _validationCheckerMail: function (e, t) {
            if ("" === e) return this.mailRow.showErrorText(BI.i18nText("Dec-Error_Email_Not_Null")), !1;
            if (/^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(e)) return this.mailRow.hideError(), BI.isEmpty(this._getUsername()) || this.captchaRow.setButtonEnable(!0), !0;
            var i = BI.i18nText("Dec-Error_Email_Format");
            return t ? this.mailRow.showErrorText(i) : this.mailRow.showError(i), !1
        }, _getUsername: function () {
            if (this.usernameRow.isVisible()) return this.usernameRow.getValue()[0];
            var e = this.model.userNames;
            return 0 < BI.size(e) ? e[0].value : ""
        }, _hideAllError: function () {
            this.mailRow.hideError(), this.captchaRow.hideError(), this.warningText.setText("")
        }
    });
    e.EVENT_INPUT_TYPE = "EVENT_INPUT_TYPE", BI.shortcut("dec.login.forget", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        _init: function () {
            this.loginConfigInfo = Dec.loginConfig || {}
        }, context: ["selectedTab", "loginInfo", "propsInfo"], state: function () {
            return {isPhone: !0, userNames: [], captchaSendToken: ""}
        }, watch: {
            isPhone: function () {
                this.setUserNames([])
            }
        }, computed: {
            platformTitle: function () {
                return this.loginConfigInfo.loginTitle || BI.i18nText("Dec-Decision")
            }
        }, actions: {
            setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, getUserNames: function (e, t) {
                var i = this;
                Dec.Utils.getUserNamesByPhone(e, function (e) {
                    e.data ? i.model.userNames = BI.map(e.data, function (e, t) {
                        return {text: t, value: t}
                    }) : i.model.userNames = [], t(e)
                })
            }, setUserNames: function (e) {
                this.model.userNames = e
            }, captcha: function (e, t) {
                Dec.Utils.loginCaptcha(e, t)
            }, setCaptchaSendToken: function (e) {
                this.model.captchaSendToken = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }, startAuthentication: function (e, t) {
                Dec.Utils.loginAuthentication(e, function (e) {
                    t(e)
                })
            }, tokenLogin: function (e, t) {
                BI.Services.getService("dec.service.login").useTokenLoginValue(e, this.model.loginInfo.validity, t)
            }, setIsPhone: function (e) {
                this.model.isPhone = e
            }
        }
    });
    BI.model("dec.model.login.forget", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: ""}, _store: function () {
            return BI.Models.getModel("dec.model.login.locked")
        }, watch: {}, render: function () {
            var e = this;
            this.options;
            return {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.horizontal_auto",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Authentication")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            e.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "bi.label",
                            text: BI.i18nText(this.model.propsInfo.errorMsg),
                            textAlign: "left",
                            whiteSpace: "normal",
                            tgap: 40,
                            bgap: 30
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-locked-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Sure"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    e.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                }
                            }]
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }
    });
    BI.shortcut("dec.login.locked", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["propsInfo", "selectedTab"], state: function () {
            return {}
        }, computed: {}, actions: {
            setSelectedTab: function (e) {
                this.model.selectedTab = e
            }
        }
    });
    BI.model("dec.model.login.locked", e)
}(), BI.constant("dec.constant.login.way.extend", []), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "", inputType: "text"}, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.vertical",
                items: [{
                    type: "dec.login.input.item",
                    iconCls: e.iconCls,
                    invisible: BI.isIE(),
                    bgap: 10,
                    watermark: e.watermark,
                    inputType: e.inputType,
                    ref: function (e) {
                        t.usernameNotIERow = e
                    },
                    listeners: [{
                        eventName: "EVENT_BLUR", action: function () {
                            t.fireEvent("EVENT_BLUR")
                        }
                    }]
                }, {
                    type: "dec.login.item",
                    iconCls: e.iconCls,
                    invisible: !BI.isIE(),
                    bgap: 10,
                    watermark: e.watermark,
                    inputType: e.inputType,
                    ref: function (e) {
                        t.usernameIERow = e
                    },
                    listeners: [{
                        eventName: "EVENT_BLUR", action: function () {
                            t.fireEvent("EVENT_BLUR")
                        }
                    }]
                }]
            }
        }, showError: function (e) {
            BI.isIE() ? this.usernameIERow.showErrorText(e) : this.usernameNotIERow.showError(e)
        }, getValue: function () {
            return BI.isIE() ? this.usernameIERow.getValue() : this.usernameNotIERow.getValue()
        }
    });
    BI.shortcut("dec.login.login.item", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-login"}, _store: function () {
            return BI.Models.getModel("dec.model.login.login")
        }, watch: {
            supportForgetPwd: function (e) {
                this.forgetPasswordRow.setVisible(e)
            }, needSlider: function (e) {
                this.sliderBar.setVisible(e), this.sliderError.setVisible(e)
            }
        }, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute", items: [{
                    el: {
                        type: "bi.vertical",
                        items: [{
                            type: "dec.login.login.item",
                            $testId: "dec-login-username",
                            iconCls: "login-username-font",
                            tgap: 50,
                            watermark: BI.i18nText("Dec-User_Name"),
                            ref: function (e) {
                                t.usernameRow = e
                            },
                            listeners: [{
                                eventName: "EVENT_BLUR", action: function () {
                                    t.store.checkUsername(this.getValue())
                                }
                            }]
                        }, {
                            type: "dec.login.login.item",
                            $testId: "dec-login-password",
                            iconCls: "login-password-font",
                            watermark: BI.i18nText("Dec-Password"),
                            inputType: "password",
                            ref: function (e) {
                                t.passwordRow = e
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "dec.login.slider", invisible: !0, ref: function (e) {
                                    t.sliderBar = e
                                }, listeners: [{
                                    eventName: "EVENT_SUCCESS", action: function () {
                                        t.sliderError.setText("")
                                    }
                                }, {
                                    eventName: "EVENT_FAIL", action: function () {
                                        t.sliderError.setText(BI.i18nText("Dec-Login_Need_Slider"))
                                    }
                                }]
                            }]
                        }, {
                            type: "bi.label",
                            $testId: "dec-login-slider-error-text",
                            invisible: !0,
                            textAlign: "left",
                            height: 20,
                            cls: "login-error",
                            ref: function (e) {
                                t.sliderError = e
                            }
                        }, {
                            type: "bi.left_right_vertical_adapt",
                            bgap: 30,
                            items: {
                                left: [{
                                    type: "bi.multi_select_item",
                                    $testId: "dec-login-remember",
                                    lgap: -5,
                                    height: 16,
                                    text: BI.i18nText("Dec-Login_Remember"),
                                    logic: {dynamic: !0},
                                    ref: function (e) {
                                        t.rememberRow = e
                                    }
                                }],
                                right: [{
                                    type: "bi.button",
                                    $testId: "dec-login-forget-password",
                                    clear: !0,
                                    height: 16,
                                    invisible: !this.model.supportForgetPwd,
                                    text: BI.i18nText("Dec-Basic_Forget_Password"),
                                    ref: function (e) {
                                        t.forgetPasswordRow = e
                                    },
                                    handler: function () {
                                        t.store.setSelectedTab(DecCst.Login.Tabs.FORGET_PASSWORD)
                                    }
                                }].concat(this._createItems())
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                cls: "login-button",
                                text: BI.i18nText("Dec-Basic_Login"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    t._start()
                                }
                            }]
                        }, {
                            el: {
                                type: "bi.vertical",
                                $testId: "dec-login-logged-chang-text",
                                cls: "login-error",
                                invisible: !0,
                                scrolly: !1,
                                items: [{
                                    type: "bi.text",
                                    tagName: "span",
                                    whiteSpace: "normal",
                                    text: BI.i18nText("Dec-Login_Other_Logged_Tip")
                                }, {
                                    type: "bi.text",
                                    $testId: "dec-login-logged-chang-password",
                                    tagName: "span",
                                    cls: "password-btn",
                                    text: BI.i18nText("Dec-Login_Change_Password"),
                                    handler: function () {
                                        t.model.isNeedVerify ? t.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING) : t.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_OLD)
                                    }
                                }],
                                ref: function (e) {
                                    t.loginErrorRow = e
                                }
                            }, tgap: 20
                        }, {
                            el: {
                                type: "bi.text",
                                $testId: "dec-login-logged-text",
                                cls: "login-error",
                                invisible: !0,
                                whiteSpace: "normal",
                                text: BI.i18nText("Dec-Login_Normal_Other_Logged_Tip"),
                                ref: function (e) {
                                    t.loginNormalErrorRow = e
                                }
                            }, tgap: 20
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }, mounted: function () {
            var t = this;
            this.store.initData(), this.element.keyup(function (e) {
                13 === e.keyCode && t._start()
            })
        }, _createItems: function () {
            return BI.map(BI.Constants.getConstant("dec.constant.login.way.extend"), function (e, t) {
                return {type: t.cardType}
            })
        }, _start: function () {
            var t = this, e = this.usernameRow.getValue(), i = this.passwordRow.getValue(),
                o = this.rememberRow.isSelected() ? -2 : -1, n = this.sliderBar.getStatus();
            t.loginErrorRow.invisible(), t.loginNormalErrorRow.invisible(), "" !== e ? "" !== i ? !n.show || n.status ? (this.store.setLoginInfo({
                username: e,
                validity: o,
                phone: "",
                captcha: ""
            }), this.store.login({
                username: e,
                password: BI.aesEncrypt(i, Dec.system.frontSeed),
                validity: o,
                sliderToken: this.model.sliderToken,
                origin: Dec.Utils.getUrlQuery("origin"),
                encrypted: !0
            }, function (e) {
                e.data && e.data.accessToken ? t.fireEvent("EVENT_LOGIN", e.data) : BI.bind(BI.Services.getService("dec.service.login.login").getHandler(e.errorCode), t)(e)
            })) : this.sliderError.setText(BI.i18nText("Dec-Login_Need_Slider")) : this.passwordRow.showError(BI.i18nText("Dec-Error_Password_Not_Null")) : this.usernameRow.showError(BI.i18nText("Dec-Error_Username_Not_Null"))
        }
    });
    BI.shortcut("dec.login.login", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["selectedTab", "verifyConfig", "loginInfo", "propsInfo", "sliderToken"], state: function () {
            return {forgetPwd: !1, systemInfo: {}, needSlider: !1}
        }, computed: {
            supportForgetPwd: function () {
                return !this.model.systemInfo.syncUserOpen && "default" === this.model.systemInfo.loginAuthenticType && this.model.forgetPwd
            }, isNeedVerify: function () {
                return this.model.verifyConfig.smsVerificationAfterChangePassword || this.model.verifyConfig.emailVerificationAfterChangePassword
            }
        }, actions: {
            initData: function () {
                var i = this;
                Dec.Utils.loginConfig(function (t) {
                    i.model.verifyConfig = t, Dec.Utils.getSystemInfo(function (e) {
                        i.model.forgetPwd = t.supportForgetPwd, i.model.systemInfo = e
                    })
                })
            }, checkUsername: function (e) {
                var t = this;
                this.model.sliderToken = "", BI.isEmptyString(e) || Dec.Utils.getUsernameErrorTimes(e, function (e) {
                    t.model.needSlider = e
                })
            }, setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, setLoginInfo: function (e) {
                this.model.loginInfo = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }, login: function (e, t) {
                Dec.Utils.login(e, t)
            }, setNeedSlider: function (e) {
                this.model.needSlider = e
            }
        }
    });
    BI.model("dec.model.login.login", e)
}(), function () {
    var t = "default_fail", e = BI.inherit(BI.OB, {
        init: function () {
            this.failMap = {}, this._initErrorHandler()
        }, addHandler: function (e, t) {
            this.failMap[e] = t
        }, getHandler: function (e) {
            return BI.isFunction(this.failMap[e]) ? this.failMap[e] : this.failMap[t]
        }, _initErrorHandler: function () {
            this.failMap[DecCst.ErrorCode.USER_LOGGED] = function (e) {
                this.store.setPropsInfo({
                    token: e.errorMsg,
                    isChangePwd: !0,
                    from: DecCst.Login.AuthenticationModule.SINGLE
                }), this.store.setNeedSlider(!1), this.loginErrorRow.visible()
            }, this.failMap[DecCst.ErrorCode.USER_LOGGED_CAN_NOT_CHANGE_PASSWORD] = function () {
                this.store.setNeedSlider(!1), this.loginNormalErrorRow.visible()
            }, this.failMap[DecCst.ErrorCode.USERNAME_UNAVAILABLE] = function () {
                this.usernameRow.showError(BI.i18nText("Dec-Error_Login_Username_Unable"))
            }, this.failMap[DecCst.ErrorCode.USERNAME_NOT_EXIST_PASSWORD_ERROR] = function () {
                this.passwordRow.showError(BI.i18nText("Dec-Error_Incorrect_Password_Username"))
            }, this.failMap[DecCst.ErrorCode.PASSWORD_ERROR_NEED_SPLIDER] = function () {
                this.passwordRow.showError(BI.i18nText("Dec-Error_Incorrect_Password_Username")), this.store.setNeedSlider(!0), this.sliderBar && this.sliderBar.resetAll()
            }, this.failMap[DecCst.ErrorCode.SMS_CAPTCHA_UNCHECK] = function (e) {
                this.store.setPropsInfo({
                    token: e.errorMsg,
                    isChangePwd: !1,
                    from: DecCst.Login.AuthenticationModule.LOGIN
                }), this.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING)
            }, this.failMap[DecCst.ErrorCode.PASSWORD_NEED_SPLIDER] = function () {
                this.store.setNeedSlider(!0), this.sliderBar.resetAll()
            }, this.failMap[DecCst.ErrorCode.PASSWORD_LOCKED] = function (e) {
                this.store.setPropsInfo({errorMsg: e.errorMsg}), this.store.setSelectedTab(DecCst.Login.Tabs.LOCKED)
            }, this.failMap[DecCst.ErrorCode.PASSWORD_NEED_UPDATE] = function (e) {
                this.store.setPropsInfo({
                    token: e.errorMsg,
                    isChangePwd: !0,
                    from: DecCst.Login.AuthenticationModule.PWD_UPDATE
                }), this.model.isNeedVerify ? this.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING) : this.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_OLD)
            }, this.failMap[DecCst.ErrorCode.PASSWORD_STRENGTH] = function (e) {
                this.store.setPropsInfo({
                    token: e.errorMsg,
                    isChangePwd: !0,
                    from: DecCst.Login.AuthenticationModule.PWD_STRENGTH
                }), this.model.isNeedVerify ? this.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING) : this.store.setSelectedTab(DecCst.Login.Tabs.PASSWORD_OLD)
            }, this.failMap[DecCst.ErrorCode.CAPTCHA_TIMEOUT] = function () {
                this.sliderError.setText(BI.i18nText("Dec-Basic_Captcha_Timeout")), this.sliderBar.resetAll()
            }, this.addHandler(t, function () {
                this.passwordRow.showError(BI.i18nText("Dec-Login_Fail"))
            })
        }
    });
    BI.service("dec.service.login.login", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-password"}, _store: function () {
            return BI.Models.getModel("dec.model.login.password")
        }, watch: {
            password: function (e) {
                this.passwordCombo.setPassword(e)
            }
        }, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute", items: [{
                    el: {
                        type: "bi.horizontal_auto",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Change_Password")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            t.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "bi.absolute",
                            height: 60,
                            items: [{
                                el: {
                                    type: "dec.login.item",
                                    iconCls: "login-new-password-font",
                                    watermark: BI.i18nText("Dec-Login_New_Password"),
                                    inputType: "password",
                                    ref: function (e) {
                                        t.passwordRow = e
                                    },
                                    listeners: [{
                                        eventName: "EVENT_CHANGE", action: function () {
                                            t.store.setPassword(this.getValue())
                                        }
                                    }, {
                                        eventName: "EVENT_FOCUS", action: function () {
                                            t.passwordCombo.setVisible(!0)
                                        }
                                    }, {
                                        eventName: "EVENT_BLUR", action: function () {
                                            t.passwordCombo.setVisible(!1), t.passwordCombo.isValid() || t.passwordRow.showErrorText(BI.i18nText("Dec-Error_Password_Strength_Not"))
                                        }
                                    }]
                                }, top: 0, left: 0, right: 0, bottom: 0
                            }, {
                                el: {
                                    type: "dec.password.strength", invisible: !0, adjustHeight: 36, ref: function (e) {
                                        t.passwordCombo = e
                                    }
                                }, top: 0, right: 0
                            }]
                        }, {
                            type: "dec.login.item",
                            bgap: 10,
                            iconCls: "login-confirm-password-font",
                            watermark: BI.i18nText("Dec-Login_Re_New_Password"),
                            inputType: "password",
                            ref: function (e) {
                                t.rePassswordRow = e
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-password-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Save"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    t._start()
                                }
                            }]
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }, _start: function () {
            var t = this, e = this.passwordRow.getValue(), i = this.rePassswordRow.getValue();
            "" !== e ? this.passwordCombo.isValid() ? "" !== i ? e === i ? this.store.save({
                captchaToken: this.model.propsInfo.token,
                newPassword: e
            }, function (e) {
                e.data ? t.store.setSelectedTab(DecCst.Login.Tabs.SUCCESS_TOKEN) : e.errorCode === DecCst.ErrorCode.CAPTCHA_TIMEOUT ? (BI.Msg.toast(BI.i18nText("Dec-Error_Captcha_Timeout"), {level: "error"}), t.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)) : e.errorCode === DecCst.ErrorCode.PASSWORD_STRENGTH ? t.passwordRow.showError(BI.i18nText("Dec-Error_Password_Strength_Not")) : e.errorCode === DecCst.ErrorCode.PASSWORD_SAME_ERROR ? t.passwordRow.showError(BI.i18nText("Dec-Error_Password_Equal_Old")) : BI.Msg.toast(BI.i18nText("Dec-Login_Change_Password_Fail"), {level: "error"})
            }) : this.rePassswordRow.showError(BI.i18nText("Dec-Error_Password_Be_Equal")) : this.rePassswordRow.showError(BI.i18nText("Dec-Error_New_Password_Null")) : this.passwordRow.showErrorText(BI.i18nText("Dec-Error_Password_Strength_Not")) : this.passwordRow.showError(BI.i18nText("Dec-Error_New_Password_Null"))
        }
    });
    BI.shortcut("dec.login.password", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["selectedTab", "propsInfo"], state: function () {
            return {password: ""}
        }, computed: {}, actions: {
            save: function (e, t) {
                Dec.Utils.updateLoginPassword(e, t)
            }, setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }, setPassword: function (e) {
                this.model.password = e
            }
        }
    });
    BI.model("dec.model.login.password", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-login-single", username: ""}, _store: function () {
            return BI.Models.getModel("dec.model.login.single")
        }, watch: {
            password: function (e) {
                this.passwordCombo.setPassword(e)
            }
        }, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute", items: [{
                    el: {
                        type: "bi.horizontal_auto",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Change_Password")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            t.fireEvent("EVENT_BACK")
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "bi.label",
                            text: this.model.showDesc,
                            whiteSpace: "normal",
                            invisible: !this.model.showDesc,
                            bgap: 15
                        }, {
                            type: "dec.login.item",
                            iconCls: "login-password-font",
                            bgap: 10,
                            watermark: BI.i18nText("Dec-Login_Old_Password"),
                            inputType: "password",
                            ref: function (e) {
                                t.oldPasswordRow = e
                            }
                        }, {
                            type: "bi.absolute",
                            height: 60,
                            items: [{
                                el: {
                                    type: "dec.login.item",
                                    iconCls: "login-new-password-font",
                                    watermark: BI.i18nText("Dec-Login_New_Password"),
                                    inputType: "password",
                                    ref: function (e) {
                                        t.passwordRow = e
                                    },
                                    listeners: [{
                                        eventName: "EVENT_CHANGE", action: function () {
                                            t.store.setPassword(this.getValue())
                                        }
                                    }, {
                                        eventName: "EVENT_FOCUS", action: function () {
                                            t.passwordCombo.setVisible(!0)
                                        }
                                    }, {
                                        eventName: "EVENT_BLUR", action: function () {
                                            t.passwordCombo.setVisible(!1), t.passwordCombo.isValid() || t.passwordRow.showErrorText(BI.i18nText("Dec-Error_Password_Strength_Not"))
                                        }
                                    }]
                                }, top: 0, left: 0, right: 0, bottom: 0
                            }, {
                                el: {
                                    type: "dec.password.strength", invisible: !0, adjustHeight: 36, ref: function (e) {
                                        t.passwordCombo = e
                                    }
                                }, top: 0, right: 0
                            }]
                        }, {
                            type: "dec.login.item",
                            iconCls: "login-confirm-password-font",
                            watermark: BI.i18nText("Dec-Login_Re_New_Password"),
                            inputType: "password",
                            ref: function (e) {
                                t.rePassswordRow = e
                            }
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-single-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Sure"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    t._start()
                                }
                            }]
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }, _start: function () {
            var t = this, e = this.oldPasswordRow.getValue(), i = this.passwordRow.getValue(),
                o = this.rePassswordRow.getValue();
            "" !== e ? "" !== i ? this.passwordCombo.isValid() ? "" !== o ? i === o ? i !== e ? this.store.changePwd({
                username: this.options.username,
                oldPassword: BI.encode(e),
                newPassword: BI.encode(i)
            }, function (e) {
                e.data && !t.model.isNeedVerify ? t.fireEvent("EVENT_SURE", i) : e.data && t.model.isNeedVerify ? (t.store.setPropsInfo({
                    token: e.data,
                    isChangePwd: !1,
                    from: DecCst.Login.AuthenticationModule.LOGIN
                }), t.store.setSelectedTab(DecCst.Login.Tabs.VERIFY_BING)) : e.errorCode === DecCst.ErrorCode.OLD_PASSWORD_ERROR ? t.oldPasswordRow.showError(BI.i18nText("Dec-Error_Old_Password_Error")) : e.errorCode === DecCst.ErrorCode.PASSWORD_SAME_ERROR ? t.oldPasswordRow.showError(BI.i18nText("Dec-Error_Password_Equal_Old")) : BI.Msg.toast(BI.i18nText("Dec-Login_Change_Password_Fail"))
            }) : this.passwordRow.showError(BI.i18nText("Dec-Error_Password_Equal_Old")) : this.rePassswordRow.showError(BI.i18nText("Dec-Error_Password_Be_Equal")) : this.rePassswordRow.showError(BI.i18nText("Dec-Error_New_Password_Null")) : this.passwordRow.showErrorText(BI.i18nText("Dec-Error_Password_Strength_Not")) : this.passwordRow.showError(BI.i18nText("Dec-Error_New_Password_Null")) : this.oldPasswordRow.showError(BI.i18nText("Dec-Error_Old_Password_Null"))
        }
    });
    BI.shortcut("dec.login.single", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["selectedTab", "verifyConfig", "propsInfo"], state: function () {
            return {password: ""}
        }, computed: {
            isNeedVerify: function () {
                return this.model.verifyConfig.smsRemind || this.model.verifyConfig.emailRemind
            }, showDesc: function () {
                switch (this.model.propsInfo.from) {
                    case DecCst.Login.AuthenticationModule.LOGIN:
                        return BI.i18nText("Dec-Login_Change_Password_Tip", BI.i18nText("Dec-Login_Authentication_Open"));
                    case DecCst.Login.AuthenticationModule.PWD_STRENGTH:
                        return BI.i18nText("Dec-Login_Change_Password_Strength_Tip");
                    case DecCst.Login.AuthenticationModule.PWD_UPDATE:
                        return BI.i18nText("Dec-Login_Change_Password_Update_Tip");
                    case DecCst.Login.AuthenticationModule.SINGLE:
                    default:
                        return ""
                }
            }
        }, actions: {
            changePwd: function (e, t) {
                Dec.Utils.loginChangePwd(e, t)
            }, setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }, setPassword: function (e) {
                this.model.password = e
            }
        }
    });
    BI.model("dec.model.login.single", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "", $testId: "dec-login-password-success", username: "", pwd: "", loginValidity: ""},
        _store: function () {
            return BI.Models.getModel("dec.model.login.password.success")
        },
        watch: {},
        render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.vertical",
                        items: [{
                            type: "bi.vertical",
                            cls: "password-success-font",
                            items: [{type: "bi.icon", height: 96, width: 96}, {
                                type: "bi.label",
                                tgap: 5,
                                text: BI.i18nText("Dec-Login_Change_Password_Success")
                            }]
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                el: {
                                    type: "bi.button",
                                    $testId: "dec-login-btn",
                                    cls: "login-button",
                                    text: BI.i18nText("Dec-Login_Now"),
                                    width: 190,
                                    height: 40,
                                    handler: function () {
                                        t._login()
                                    }
                                }, tgap: 60
                            }, {
                                type: "bi.label",
                                cls: "bi-tips",
                                width: 190,
                                text: "",
                                tgap: 15,
                                textAlign: "left",
                                ref: function (e) {
                                    t.autoLogin = e
                                }
                            }]
                        }]
                    }, top: 40, right: 40, bottom: 0, left: 40
                }]
            }
        },
        mounted: function () {
            this._autoLogin()
        },
        _autoLogin: function () {
            var e = this, t = 0, i = window.setInterval(function () {
                if (3 === t) return window.clearInterval(i), void e._login();
                e.autoLogin.setText(3 - t + "s" + BI.i18nText("Dec-Login_Auto_Time")), t++
            }, 1e3)
        },
        _login: function () {
            var t = this, e = this.options;
            this.store.login({
                username: e.username,
                password: BI.aesEncrypt(e.pwd, Dec.system.frontSeed),
                validity: e.loginValidity,
                origin: Dec.Utils.getUrlQuery("origin"),
                encrypted: !0
            }, function (e) {
                e.data ? t.fireEvent("EVENT_LOGIN", e.data) : BI.Msg.toast(BI.i18nText("Dec-Login_Fail"), {level: "error"})
            })
        }
    });
    BI.shortcut("dec.login.password.success", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["propsInfo", "loginInfo"], state: function () {
            return {}
        }, computed: {}, actions: {
            login: function (e, t) {
                Dec.Utils.login(e, t)
            }, tokenLogin: function (e, t) {
                BI.Services.getService("dec.service.login").useTokenLoginValue(e, this.model.loginInfo.validity, t)
            }
        }
    });
    BI.model("dec.model.login.password.success", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "", $testId: "dec-login-password-token"}, _store: function () {
            return BI.Models.getModel("dec.model.login.password.success")
        }, watch: {}, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.vertical",
                        items: [{
                            type: "bi.vertical",
                            cls: "password-success-font",
                            items: [{type: "bi.icon", height: 96, width: 96}, {
                                type: "bi.label",
                                tgap: 5,
                                text: BI.i18nText("Dec-Login_Change_Password_Success")
                            }]
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                el: {
                                    type: "bi.button",
                                    $testId: "dec-login-btn",
                                    cls: "login-button",
                                    text: BI.i18nText("Dec-Login_Now"),
                                    width: 190,
                                    height: 40,
                                    handler: function () {
                                        t._login()
                                    }
                                }, tgap: 60
                            }, {
                                type: "bi.label",
                                cls: "bi-tips",
                                width: 190,
                                text: "",
                                tgap: 15,
                                textAlign: "left",
                                ref: function (e) {
                                    t.autoLogin = e
                                }
                            }]
                        }]
                    }, top: 40, right: 40, bottom: 0, left: 40
                }]
            }
        }, mounted: function () {
            this._autoLogin()
        }, _autoLogin: function () {
            var e = this, t = 0, i = window.setInterval(function () {
                if (3 === t) return window.clearInterval(i), void e._login();
                e.autoLogin.setText(3 - t + "s" + BI.i18nText("Dec-Login_Auto_Time")), t++
            }, 1e3)
        }, _login: function () {
            var t = this;
            this.store.tokenLogin(this.model.propsInfo.token, function (e) {
                e.data ? t.fireEvent("EVENT_LOGIN", e.data) : BI.Msg.toast(BI.i18nText("Dec-Login_Fail"), {level: "error"})
            })
        }
    });
    BI.shortcut("dec.login.password.token", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: ""}, _store: function () {
            return BI.Models.getModel("dec.model.login.verify")
        }, watch: {}, beforeInit: function (e) {
            this.store.initPage(e)
        }, render: function () {
            var e = this;
            this.options;
            return {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.horizontal_auto",
                        items: [{
                            el: {
                                type: "bi.absolute",
                                height: 24,
                                items: [{
                                    el: {
                                        type: "bi.label",
                                        height: 24,
                                        text: BI.i18nText("Dec-Login_Authentication")
                                    }, top: 0, left: 0, right: 0, bottom: 0
                                }, {
                                    el: {
                                        type: "bi.icon_button",
                                        $value: "back",
                                        height: 24,
                                        cls: "login-back-font",
                                        handler: function () {
                                            e.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                        }
                                    }, top: 0, left: 0
                                }]
                            }, vgap: 28
                        }, {
                            type: "bi.label",
                            text: this.model.showDesc,
                            textAlign: "left",
                            whiteSpace: "normal",
                            tgap: 40,
                            bgap: 30
                        }, {
                            type: "bi.horizontal_auto",
                            items: [{
                                type: "bi.button",
                                $testId: "dec-login-verify-btn",
                                cls: "login-button",
                                text: BI.i18nText("BI-Basic_Sure"),
                                width: 190,
                                height: 40,
                                handler: function () {
                                    e.store.setSelectedTab(DecCst.Login.Tabs.LOGIN)
                                }
                            }]
                        }]
                    }, top: 0, right: 40, bottom: 0, left: 40
                }]
            }
        }
    });
    BI.shortcut("dec.login.verify", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        _init: function () {
            this.loginConfigInfo = Dec.loginConfig || {}
        }, context: ["loginInfo", "propsInfo", "selectedTab", "verifyConfig"], state: function () {
            return {}
        }, computed: {
            platformTitle: function () {
                return this.loginConfigInfo.loginTitle || BI.i18nText("Dec-Decision")
            }, supportType: function () {
                var e = [], t = this.model.verifyConfig;
                return this.model.propsInfo.isChangePwd ? (t.smsVerificationAfterChangePassword && e.push(DecCst.Login.AuthenticationWay.PHOME), t.emailVerificationAfterChangePassword && e.push(DecCst.Login.AuthenticationWay.EMAIL)) : (t.smsRemind && e.push(DecCst.Login.AuthenticationWay.PHOME), t.emailRemind && e.push(DecCst.Login.AuthenticationWay.EMAIL)), e
            }, openService: function () {
                return BI.map(this.model.supportType, function (e, t) {
                    return BI.i18nText(t === DecCst.Login.AuthenticationWay.PHOME ? "Dec-User_Mobile" : "Dec-User_Email")
                }).join(BI.i18nText("BI-Basic_Or"))
            }, showDesc: function () {
                switch (this.model.propsInfo.from) {
                    case DecCst.Login.AuthenticationModule.SINGLE:
                        return BI.i18nText("Dec-Login_Verify_Password_Single_Tip", this.model.openService);
                    case DecCst.Login.AuthenticationModule.LOGIN:
                        return BI.i18nText("Dec-Login_Verify_Tip", this.model.openService);
                    case DecCst.Login.AuthenticationModule.PWD_STRENGTH:
                        return BI.i18nText("Dec-Login_Verify_Password_Strength_Tip", this.model.openService);
                    case DecCst.Login.AuthenticationModule.PWD_UPDATE:
                        return BI.i18nText("Dec-Login_Verify_Password_Update_Tip", this.model.openService);
                    default:
                        return ""
                }
            }
        }, actions: {
            initPage: function (t) {
                var i = this;
                Dec.Utils.loginGetValidationTool(this.model.propsInfo.token, function (e) {
                    i._isBind(e, i.model.supportType) ? (i.setPropsInfo({
                        phone: e.mobile,
                        email: e.email,
                        isChangePwd: i.model.propsInfo.isChangePwd,
                        token: i.model.propsInfo.token,
                        from: i.model.propsInfo.from
                    }), i.setSelectedTab(DecCst.Login.Tabs.AUTHENTICATION)) : t()
                })
            }, setSelectedTab: function (e) {
                this.model.selectedTab = e
            }, setPropsInfo: function (e) {
                this.model.propsInfo = e
            }
        }, _isBind: function (e, t) {
            return !!e.mobile && BI.contains(t, DecCst.Login.AuthenticationWay.PHOME) || !!e.email && BI.contains(t, DecCst.Login.AuthenticationWay.EMAIL)
        }
    });
    BI.model("dec.model.login.verify", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: ""}, _store: function () {
            return BI.Models.getModel("dec.model.login.slider.image")
        }, watch: {
            imageObj: function (e) {
                this.bgImg.setSrc(Dec.fineServletURL + "/login/image/" + e.imageId), this.moveBlock.setSrc(Dec.fineServletURL + "/login/image/" + e.moduleId), this.moveBlock.element.css({
                    left: e.modelX,
                    top: e.modelY
                })
            }, loading: function (e) {
                this.loadingBar.setVisible(e)
            }
        }, render: function () {
            var t = this;
            this.options;
            return {
                type: "bi.absolute",
                cls: "bi-card",
                width: 190,
                items: [{
                    el: {
                        type: "bi.img", height: 117, ref: function (e) {
                            t.bgImg = e
                        }
                    }, top: 0, bottom: 0, left: 0, right: 0
                }, {
                    el: {
                        type: "bi.img", width: 30, height: 30, ref: function (e) {
                            t.moveBlock = e
                        }
                    }, top: 0, left: 0
                }, {
                    el: {
                        type: "bi.icon_button", cls: "rollback-font", width: 16, height: 16, handler: function () {
                            t.fireEvent("EVENT_REFRESH"), t.refresh()
                        }
                    }, top: 10, right: 10
                }, {
                    el: {
                        type: "bi.center_adapt",
                        invisible: this.model.loadingBar,
                        height: 117,
                        cls: "bi-card bi-border upload-loading-icon",
                        items: [{
                            type: "bi.vertical",
                            items: [{type: "bi.icon", width: 46, height: 46}, {
                                type: "bi.label",
                                tgap: 5,
                                text: BI.i18nText("Dec-Basic_Loading")
                            }]
                        }],
                        ref: function (e) {
                            t.loadingBar = e
                        }
                    }, top: 0, bottom: 0, left: 0, right: 0
                }]
            }
        }, mounted: function () {
            BI.isEmptyObject(this.model.imageObj) && this.refresh()
        }, move: function (e) {
            this.moveBlock.element.css({left: e})
        }, refresh: function () {
            this.store.getImage()
        }, changeState: function (e) {
            e && this.setVisible(e);
            var t = this;
            t.element.stop().animate({height: e ? 140 : 0}, "800", function () {
                !e && t.setVisible(!1)
            })
        }
    });
    BI.shortcut("dec.login.slider.image", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        context: ["sliderToken", "loading"], state: function () {
            return {imageObj: {}}
        }, watch: {
            imageObj: function () {
                var e = this;
                BI.delay(function () {
                    e.setLoading(!1)
                }, 300)
            }
        }, actions: {
            getImage: function () {
                var t = this;
                this.model.loading || (this.model.loading = !0, Dec.Utils.getLoginSliderInfo(function (e) {
                    t.model.imageObj = e, t.model.sliderToken = e.sliderToken
                }))
            }, setLoading: function (e) {
                this.model.loading = e
            }
        }
    });
    BI.model("dec.model.login.slider.image", e)
}(), function () {
    var i = BI.inherit(BI.Widget, {
        props: {
            baseCls: "bi-icon-combo",
            $testId: "bi-icon-combo",
            width: 28,
            height: 24,
            el: {},
            popup: {},
            minWidth: 100,
            maxWidth: "auto",
            maxHeight: 300,
            direction: "bottom",
            adjustLength: 3,
            adjustXOffset: 0,
            adjustYOffset: 0,
            offsetStyle: "left",
            chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE
        }, render: function () {
            var t = this, e = this.options;
            return this.trigger = BI.createWidget(e.el, {
                type: "dec.icon_combo_trigger",
                iconCls: e.iconCls,
                title: e.title,
                items: e.items,
                width: e.width,
                height: e.height,
                iconWidth: e.iconWidth,
                iconHeight: e.iconHeight,
                value: e.value
            }), this.popup = BI.createWidget(e.popup, {
                type: "bi.icon_combo_popup",
                chooseType: e.chooseType,
                items: e.items,
                value: e.value,
                listeners: [{
                    eventName: BI.IconComboPopup.EVENT_CHANGE, action: function () {
                        t.setValue(t.popup.getValue()), t.iconCombo.hideView(), t.fireEvent(i.EVENT_CHANGE)
                    }
                }]
            }), {
                type: "bi.combo",
                direction: e.direction,
                trigger: e.trigger,
                container: e.container,
                adjustLength: e.adjustLength,
                adjustXOffset: e.adjustXOffset,
                adjustYOffset: e.adjustYOffset,
                offsetStyle: e.offsetStyle,
                el: this.trigger,
                popup: {el: this.popup, maxWidth: e.maxWidth, maxHeight: e.maxHeight, minWidth: e.minWidth},
                ref: function (e) {
                    t.iconCombo = e
                }
            }
        }, showView: function () {
            this.iconCombo.showView()
        }, hideView: function () {
            this.iconCombo.hideView()
        }, setValue: function (e) {
            this.trigger.setValue(e), this.popup.setValue(e)
        }, getValue: function () {
            var e = this.popup.getValue();
            return BI.isNull(e) ? [] : BI.isArray(e) ? e : [e]
        }, populate: function (e) {
            this.options.items = e, this.iconCombo.populate(e)
        }
    });
    i.EVENT_CHANGE = "EVENT_CHANGE", BI.shortcut("dec.icon_combo", i)
}(), function () {
    var e = BI.inherit(BI.Trigger, {
        props: {
            extraCls: "bi-icon-combo-trigger",
            el: {},
            items: [],
            iconCls: "",
            width: 28,
            height: 24,
            isShowDown: !0,
            value: ""
        }, render: function () {
            var e = this.options, t = this, i = "";
            return BI.isKey(e.value) && (i = this._digest(e.value, e.items)), {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.icon_change_button",
                        cls: "icon-combo-trigger-icon",
                        iconCls: i,
                        disableSelected: !0,
                        width: e.width - 10,
                        height: e.height,
                        iconWidth: e.iconWidth,
                        iconHeight: e.iconHeight,
                        selected: BI.isNotEmptyString(i),
                        ref: function (e) {
                            t.button = e
                        }
                    }, left: 0, right: 0, top: 0, bottom: 0
                }, {
                    el: {
                        type: "bi.icon_button",
                        disableSelected: !0,
                        cls: "icon-combo-down-icon login-trigger-font",
                        width: 10,
                        height: 10,
                        invisible: !e.isShowDown,
                        selected: BI.isNotEmptyString(i),
                        ref: function (e) {
                            t.down = e
                        }
                    }, right: 0, bottom: 0
                }]
            }
        }, _digest: function (i, e) {
            var o = "";
            return i = BI.isArray(i) ? i[0] : i, BI.any(e, function (e, t) {
                if (i === t.value) return o = t.iconCls, !0
            }), o
        }, populate: function (e) {
            var t = this.options;
            this.options.items = e || [], this.button.setIcon(t.iconCls), this.button.setSelected(!1), this.down.setSelected(!1)
        }, setValue: function (e) {
            var t = this.options;
            e = BI.isArray(e) ? e[0] : e;
            var i = this._digest(e, this.options.items);
            BI.isNotEmptyString(i) ? (this.button.setIcon(i), this.button.setSelected(!0), this.down.setSelected(!0)) : (this.button.setIcon(t.iconCls), this.button.setSelected(!1), this.down.setSelected(!1))
        }
    });
    BI.shortcut("dec.icon_combo_trigger", e)
}(), function () {
    var i = BI.inherit(BI.Widget, {
        props: {
            baseCls: "dec-login-icon-text-combo",
            $testId: "dec-login-icon-text-combo",
            minWidth: 100,
            maxWidth: "auto",
            maxHeight: 300,
            direction: "bottom",
            adjustLength: 3
        }, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.combo",
                direction: e.direction,
                trigger: e.trigger,
                container: e.container,
                adjustLength: e.adjustLength,
                el: {
                    type: "dec.login.icon.text.trigger",
                    text: e.text,
                    items: e.items,
                    value: e.value,
                    ref: function (e) {
                        t.trigger = e
                    }
                },
                popup: {
                    el: {
                        type: "bi.icon_combo_popup",
                        chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
                        items: BI.map(e.items, function (e, t) {
                            return BI.extend({
                                iconWrapperWidth: 36,
                                height: 28,
                                $testId: "dec-login-icon-text-combo-item",
                                $value: t.value
                            }, t)
                        }),
                        value: e.value,
                        listeners: [{
                            eventName: BI.IconComboPopup.EVENT_CHANGE, action: function () {
                                t.setValue(t.popup.getValue()[0]), t.iconCombo.hideView(), t.fireEvent(i.EVENT_CHANGE)
                            }
                        }],
                        ref: function (e) {
                            t.popup = e
                        }
                    }, maxWidth: e.maxWidth, maxHeight: e.maxHeight, minWidth: e.minWidth
                },
                ref: function (e) {
                    t.iconCombo = e
                }
            }
        }, setValue: function (e) {
            this.trigger.setValue(e), this.popup.setValue(e)
        }, getValue: function () {
            return this.popup ? this.popup.getValue()[0] : ""
        }
    });
    i.EVENT_CHANGE = "EVENT_CHANGE", BI.shortcut("dec.login.icon.text.combo", i)
}(), function () {
    var e = BI.inherit(BI.Trigger, {
        props: {
            extraCls: "dec-login-icon-text-trigger",
            $testId: "dec-login-icon-text-trigger",
            items: [],
            value: "",
            text: ""
        }, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.htape",
                height: 36,
                items: [{
                    type: "bi.icon_change_button",
                    cls: "icon-combo-trigger-icon",
                    width: 16,
                    iconCls: this._digest(e.value).iconCls,
                    ref: function (e) {
                        t.button = e
                    }
                }, {
                    el: {
                        type: "bi.label",
                        cls: "bi-tips",
                        $testId: "dec-login-authentication-receiver",
                        textAlign: "left",
                        text: e.text,
                        ref: function (e) {
                            t.text = e
                        }
                    }, lgap: 10
                }, {type: "bi.trigger_icon_button", cls: "trigger-btn", width: 16}]
            }
        }, _digest: function (i) {
            return BI.find(this.options.items, function (e, t) {
                return i === t.value
            }) || {}
        }, setValue: function (e) {
            var t = this._digest(e);
            this.button.setIcon(t.iconCls), this.text.setText(t.text)
        }
    });
    BI.shortcut("dec.login.icon.text.trigger", e)
}(), function () {
    var i = BI.inherit(BI.Widget, {
        props: {
            baseClass: "bi-text-value-combo",
            $testId: "bi-text-value-combo",
            height: 30,
            chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,
            text: "",
            value: ""
        }, render: function () {
            var t = this, e = this.options;
            return {
                type: "bi.combo",
                adjustLength: 0,
                el: {
                    type: "dec.login.icon_select_text_trigger",
                    items: e.items,
                    height: e.height,
                    text: e.text,
                    value: e.value,
                    ref: function (e) {
                        t.trigger = e
                    }
                },
                popup: {
                    el: {
                        type: "bi.text_value_combo_popup",
                        chooseType: e.chooseType,
                        value: e.value,
                        items: e.items,
                        listeners: [{
                            eventName: "EVENT_CHANGE", action: function () {
                                t.setValue(t.popup.getValue()), t.textIconCombo.hideView(), t.fireEvent(i.EVENT_CHANGE, arguments)
                            }
                        }],
                        ref: function (e) {
                            t.popup = e
                        }
                    }, maxHeight: 300
                },
                ref: function (e) {
                    t.textIconCombo = e
                },
                listeners: [{
                    eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW, action: function () {
                        t.trigger.setIsPopup(!0)
                    }
                }, {
                    eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, action: function () {
                        t.trigger.setIsPopup(!1)
                    }
                }]
            }
        }, setValue: function (e) {
            this.trigger.setValue(e), this.popup.setValue(e)
        }, getValue: function () {
            var e = this.popup.getValue();
            return BI.isNull(e) ? [] : BI.isArray(e) ? e : [e]
        }, populate: function (e) {
            this.options.items = e, this.textIconCombo.populate(e)
        }
    });
    i.EVENT_CHANGE = "EVENT_CHANGE", BI.shortcut("dec.login.text_value_combo", i)
}(), function () {
    var e = BI.inherit(BI.Trigger, {
        props: {baseCls: "bi-select-text-trigger dec-icon-select-text-trigger", height: 24}, render: function () {
            this.options.height -= 2;
            var t = this, e = this.options;
            return {
                type: "bi.htape",
                cls: "bi-border-bottom",
                items: [{
                    type: "bi.center_adapt",
                    width: 16,
                    cls: "item-icon login-username-font",
                    items: [{type: "bi.icon"}]
                }, {
                    type: "bi.label", textAlign: "left", height: e.height, text: e.text, title: function () {
                        return t.text.getText()
                    }, rgap: 4, lgap: 6, readonly: e.readonly, ref: function (e) {
                        t.text = e
                    }
                }, {
                    type: "bi.center_adapt",
                    width: 16,
                    cls: "trigger",
                    items: [{
                        type: "bi.icon_change_button",
                        iconCls: "pull-down-font",
                        forceNotSelected: !0,
                        ref: function (e) {
                            t.iconChangeButton = e
                        }
                    }]
                }]
            }
        }, _digest: function (i, e) {
            var t = this.options;
            i = BI.isArray(i) ? i : [i];
            var o = [], n = BI.Tree.transformToArrayFormat(e);
            return BI.each(n, function (e, t) {
                BI.deepContains(i, t.value) && !BI.contains(o, t.text || t.value) && o.push(t.text || t.value)
            }), 0 < o.length ? o.join(",") : t.text
        }, setValue: function (e) {
            this.text.setText(this._digest(e, this.options.items))
        }, setIsPopup: function (e) {
            var t = e ? "pull-up-font" : "pull-down-font";
            this.iconChangeButton.setIcon(t)
        }, populate: function (e) {
            this.options.items = e
        }
    });
    BI.shortcut("dec.login.icon_select_text_trigger", e)
}(), BI.constant("dec.constant.password.strength", [{
    id: "passwordLengthLimit",
    text: BI.i18nText("Dec-System_Password_Strength_Length_More"),
    check: function (e, t) {
        return BI.size(e) >= t
    }
}, {
    id: "includeNumbers", text: BI.i18nText("BI-Basic_Contain") + BI.i18nText("Dec-Basic_Digit"), check: function (e) {
        return /\d+/.test(e)
    }
}, {
    id: "includeLowercaseLetters",
    text: BI.i18nText("BI-Basic_Contain") + BI.i18nText("Dec-Basic_Lowercase"),
    check: function (e) {
        return /[a-z]+/.test(e)
    }
}, {
    id: "includeCapitalLetters",
    text: BI.i18nText("BI-Basic_Contain") + BI.i18nText("Dec-Basic_Capital"),
    check: function (e) {
        return /[A-Z]+/.test(e)
    }
}, {
    id: "includeSymbol", text: BI.i18nText("BI-Basic_Contain") + BI.i18nText("Dec-Basic_Symbol"), check: function (e) {
        return /[^a-zA-Z0-9]+/.test(e)
    }
}]), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "", text: ""}, render: function () {
            var t = this;
            return {
                type: "bi.vertical_adapt",
                items: [{
                    type: "bi.icon_change_button",
                    iconCls: "password-check-font",
                    iconHeight: 16,
                    ref: function (e) {
                        t.icon = e
                    }
                }, {type: "bi.label", height: 16, lgap: 5, text: this.options.text}]
            }
        }, changeIcon: function (e) {
            this.icon.setIcon(e ? "password-check-success-font" : "password-check-font")
        }
    });
    BI.shortcut("dec.password.strength.item", e)
}(), function () {
    var e = BI.inherit(BI.Widget, {
        props: {baseCls: "dec-password-strength", $testId: "dec-password-strength", adjustHeight: 0},
        _store: function () {
            return BI.Models.getModel("dec.model.password.strength")
        },
        watch: {
            password: function (i) {
                var o = this;
                BI.each(this.model.needCheckItems, function (e, t) {
                    o[t.id].changeIcon(t.check(i, o.model.passwordStrength.passwordLength))
                })
            }
        },
        beforeInit: function (e) {
            this.store.initPage(e)
        },
        render: function () {
            var i = this, e = this.options, t = (26 * this.model.checkItemsLength + 12 - e.adjustHeight) / 2;
            return {
                type: "bi.absolute",
                items: [{
                    el: {
                        type: "bi.vertical",
                        cls: "list-view-shadow bi-card",
                        vgap: 10,
                        hgap: 15,
                        items: BI.map(this.model.needCheckItems, function (e, t) {
                            return {
                                type: "dec.password.strength.item",
                                height: 16,
                                text: "passwordLengthLimit" === t.id ? BI.i18nText("Dec-System_Password_Strength_Length_More", i.model.passwordStrength.passwordLength) : t.text,
                                ref: function (e) {
                                    i[t.id] = e
                                }
                            }
                        })
                    }, top: -t
                }, {
                    el: {
                        type: "bi.center_adapt",
                        invisible: 0 === this.model.checkItemsLength,
                        cls: "triangle-wrapper",
                        items: [{type: "bi.layout", cls: "bubble-combo-triangle-left"}]
                    }, top: e.adjustHeight / 2 - 3, left: -5
                }]
            }
        },
        setPassword: function (e) {
            this.store.setPassword(e)
        },
        isValid: function () {
            return this.model.isValid
        }
    });
    BI.shortcut("dec.password.strength", e)
}(), function () {
    var e = BI.inherit(Fix.Model, {
        state: function () {
            return {passwordStrength: {}, password: ""}
        }, computed: {
            needCheckItems: function () {
                var i = this;
                return this.model.passwordStrength.passwordStrengthLimit ? BI.filter(BI.Constants.getConstant("dec.constant.password.strength"), function (e, t) {
                    return i.model.passwordStrength[t.id]
                }) : []
            }, checkItemsLength: function () {
                return BI.size(this.model.needCheckItems)
            }, isValid: function () {
                var i = this.model.password, o = this.model.passwordStrength.passwordLength;
                return !BI.some(this.model.needCheckItems, function (e, t) {
                    return !t.check(i, o)
                })
            }
        }, actions: {
            initPage: function (t) {
                var i = this;
                Dec.Utils.getLoginPasswordStrategy(function (e) {
                    i.model.passwordStrength = e, t()
                })
            }, setPassword: function (e) {
                this.model.password = e
            }
        }
    });
    BI.model("dec.model.password.strength", e)
}();